Skip to content

Fix subtract overflow when counting consensus compact entries - #5905

Merged
timvisee merged 3 commits into
devfrom
consensus-compact-entries-overflow
Jan 30, 2025
Merged

timvisee merged 3 commits into
devfrom
consensus-compact-entries-overflow

Conversation

@timvisee

@timvisee timvisee commented Jan 29, 2025 •

Copy link
Copy Markdown
Member

Fix for new subtraction overflow in #5900.

Without this fix I get the following text failure in #5903 when consensus snapshots are enabled:

2025-01-29T15:55:15.176888Z ERROR qdrant::startup: Panic occurred in file /home/timvisee/git/qdrant/lib/storage/src/content_manager/consensus_manager.rs at line 791: attempt to subtract with overflow

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --all --all-features command

@timvisee
timvisee requested review from ffuugoo and generall January 29, 2025 16:10
@timvisee
timvisee marked this pull request as ready for review January 29, 2025 16:10
@timvisee timvisee mentioned this pull request Jan 29, 2025
6 tasks done
@timvisee
timvisee merged commit cd95d93 into dev Jan 30, 2025
@timvisee
timvisee deleted the consensus-compact-entries-overflow branch January 30, 2025 09:03
timvisee added a commit that referenced this pull request Feb 11, 2025
* Fix subtract overflow when counting consensus compact entries

* Add debug assertion for last applied index and first entry index

* Update lib/storage/src/content_manager/consensus_manager.rs

Co-authored-by: Roman Titov <[email protected]>

---------

Co-authored-by: Roman Titov <[email protected]>
@timvisee timvisee mentioned this pull request Feb 11, 2025
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