Skip to content

Conversation

@meatballhat
Copy link
Contributor

@meatballhat meatballhat commented Oct 8, 2025

This introduces some considerable changes to the queue client GC so that the code using the method can take action in batches during the process. Every batch of keys considered "expired" is given to a callback function which may choose to return a specific error to interrupt iteration. The return signature of GC now returns (total, nDeleted, error) so that the code using it can report accordingly.

NOTE: This includes a backward-incompatible change to how "meta cancelation" entries are managed to use the bare "track value" rather than the SHA1 hex checksum of the "track value". This allows client usage to directly inspect the meta:cancelation hash with the "track value" understood by the client like so:

HGET meta:cancelation someInternalID9000

Part of RUNT-372 which addresses the problem of automatically + preemptively canceling work while it is still in the queue.

Copy link
Contributor

@NikhilSinha1 NikhilSinha1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked through this offline, still deciding on whether the callback function or returning a list of values is a better idea but otherwise this makes sense.

@meatballhat meatballhat marked this pull request as ready for review October 10, 2025 19:07
@meatballhat meatballhat requested a review from a team as a code owner October 10, 2025 19:07
Copy link
Contributor

@NikhilSinha1 NikhilSinha1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asked a bunch of questions over DM, LGTM

@meatballhat meatballhat merged commit abdebd5 into main Oct 11, 2025
2 checks passed
@meatballhat meatballhat deleted the gc-handles-cancel branch October 11, 2025 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants