-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: limit stream length by using redis stream trim option #24
Conversation
Thanks for the pull request, @navinkarkera! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, just some suggestions mostly on docs and comments!
@bmtcril Updated the docs as per your suggestions. Please take a look again. |
1635fea
to
d6048e0
Compare
@navinkarkera I was just waiting on @tecoholic but if you don't need that review I can approve and merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay here. Great job on the documentation by the way :)
- I tested this: followed the testing instructions and verified that the events get trimmed as expected
- I read through the code
- I checked for accessibility issues
- Includes documentation
@tecoholic Thanks for review. |
@navinkarkera 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Merged and released! Thanks! |
Description: Implements
trim
option as decided in ADR: https://github.com/openedx/event-bus-redis/blob/main/docs/decisions/0003-limiting-stream-length.rstAlso, adds more information to README.
JIRA:
Private-ref
: https://tasks.opencraft.com/browse/BB-7451Dependencies: None
Merge deadline: List merge deadline (if any)
Testing instructions:
make requirements
.make redis_up
.make redis_shell
.EVENT_BUS_REDIS_STREAM_MAX_LEN
is set to 5 for testing in Makefile command:produce_test_event
.make produce_test_event
once or twice and check length of stream in redis cli window usingXLEN dev-xblock-deleted
command.for run in {1..10}; do make produce_test_event; done
to produce 10 events. Keep checking stream length while producing. Since the trimming is not done exactly at 5 events, it might be required to produce more events to see trimming in action. At some point the stream length should be reset to around 5.Reviewers:
Merge checklist:
Post merge:
finished.
Author concerns: List any concerns about this PR - inelegant
solutions, hacks, quick-and-dirty implementations, concerns about
migrations, etc.