What happened to a tooth that had a filling that became painful several years later?

If the first filling is only for the treatment of caries and no endodontic treatment is involved, it may be due to the secondary decay of the filled tooth, and the secondary decay may lead to pulpitis and pain. It is possible that the first time root canal treatment is performed, but the tooth that has undergone root canal treatment may also cause the root tip to be infected again and apical inflammation may occur, which may cause pain again. Therefore, if a tooth with a filling becomes painful again, it should be treated in the hospital as soon as possible, and a second treatment should be performed after taking pictures and other tests to determine the situation.