What did Select all select?
A bulk action needs to tell the user which records it will affect. A checkbox above a table leaves several possibilities open: the visible page, every loaded row, or every record matching the current filter.
Consider a hypothetical support queue filtered to resolved tickets. There are 40 rows on screen and 2,400 matches in total. Someone clicks Select all, then Archive. Archiving 40 tickets may leave the job unfinished. Archiving 2,400 may exceed what the person intended.
I would make the first click select the visible page and show a specific offer: "40 tickets selected. Select all 2,400 matching tickets." The second click should change the action label to "Archive 2,400 tickets." That gives the user a chance to notice the scope before committing.
The count still leaves a timing problem. Suppose another ticket becomes resolved while the confirmation is open. If the server reruns the filter when Archive is pressed, it may include a ticket outside the selection shown in the confirmation.
For this queue, I would freeze the selected IDs when the user expands the selection. Before archiving each ticket, the server should also check that it remains resolved. A ticket reopened in the meantime should be skipped and included in the result summary. Freezing membership prevents additions; checking current state prevents an outdated selection from archiving active work.
A different product might deliberately act on whatever matches at execution time. That behavior needs wording such as "Archive all tickets resolved when this runs," with an estimated count. It is a useful option for a recurring cleanup job.
To test the support queue, select all matches, then resolve one extra ticket and reopen one selected ticket before confirming. The extra ticket should stay untouched. The reopened ticket should be reported as skipped. The final count should explain the difference from the confirmation.