At least for some anesthetics, the pain centers will be active while under anesthesia. Rather, interconnectivity between brain areas is disrupted, preventing your conscious experience of pain. Whether or not that is a case of amnesia regarding what you experienced, or a genuine lack of experience, is an open question. Although I firmly believe that brain wide integration is necessary for consciousness and so there is no experience of pain.
I wonder if the pain sensation in your brain , despite not being connected consciously to your experience, has some lingering after effects. Like the engine room of a ship springing a leak but the bridge is just fine and never noticed it when it happened.