Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[queue] remove legacy #158

Merged
merged 2 commits into from
Dec 4, 2024
Merged

[queue] remove legacy #158

merged 2 commits into from
Dec 4, 2024

Conversation

philandstuff
Copy link
Contributor

@philandstuff philandstuff commented Dec 4, 2024

This tidies a bunch of legacy code in the shuffle shard queue implementation.

This is paving the way to do stuff with PLAT-604.

Our loop bounds were wrong here.

This isn't a big deal in len.lua because XLEN on a nonexistent key returns 0.

It's not a big deal in read.lua because we immediately take (offset + idx) %
streams, folding into the range [0, streams) anyway.  It just means we check the
original stream twice in the loop.

However this breaks if you copy-paste the pattern for some other purpose, like
calling XINFO GROUPS on a key.  That command errors if the key doesn't exist.
@philandstuff philandstuff requested a review from a team as a code owner December 4, 2024 12:47
@philandstuff philandstuff changed the title [queue remove legacy [queue] remove legacy Dec 4, 2024
This is now fully rolled out, we have no base streams any more.  I have checked
this in all our clusters with:

    KEYS input:prediction:??-????????????????????????????????

and found a bunch of empty streams with no TTLs.  I manually deleted them.
@philandstuff philandstuff merged commit 3490956 into main Dec 4, 2024
2 checks passed
@philandstuff philandstuff deleted the queue-remove-legacy branch December 4, 2024 12:53
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.

2 participants