Pain usually occurs when the pus accumulation causes pressure on the nerves. If the cavity is large enough drainage is automatically established and whatever pus is forming is getting drained on its own. Do not wait for pain or swelling to rush you to the dentist.
Next Steps
visit a dentist as soon as possible for a proper clinical examination.
Health Tips
do not delay this treatment till the infection becomes severe or the tooth becomes non restorable.