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

Fix possibility to generate duplicate IDs in XADD #275

Merged
merged 1 commit into from Jun 29, 2022
Merged

Fix possibility to generate duplicate IDs in XADD #275

merged 1 commit into from Jun 29, 2022

Commits on Jun 28, 2022

  1. Fix possibility to generate duplicate IDs in XADD

    The existing code is attempting to avoid duplicate IDs by checking the
    last ID in the queue. But if the queue is emptied and a new event
    added fast enough, it's possible to end up with duplicate IDs.
    
    This adds a variable to streamKey that keeps track of the last ID even
    when the stream itself is empty, which likely solves most cases where
    this could cause problems.
    readams committed Jun 28, 2022
    Copy the full SHA
    2384c4c View commit details
    Browse the repository at this point in the history