Skip to content

Conversation

timvisee
Copy link
Member

The resharding state in a consensus snapshot was simply not applied. This fixes the issue.

We've been seeing a wild range of resharding state errors in chaos testing, which we've yet to have an explanation for. I expect this to resolve all those problems.

A proper test for this will be done separately, as this is part of a wider effort fixing issues.

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?

let State {
config,
shards,
resharding,
Copy link
Member Author

@timvisee timvisee Mar 20, 2025

Choose a reason for hiding this comment

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

We totally missed handling resharding here. Struct destruction revealed the unused field.

This comment was marked as resolved.

@timvisee timvisee changed the title Fix consensus snapshot not applying resharding state properly Fix consensus snapshot not applying resharding state Mar 20, 2025
@timvisee timvisee requested a review from coszio March 20, 2025 14:59
Copy link
Member

@KShivendu KShivendu left a comment

Choose a reason for hiding this comment

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

Thanks! I almost came to a similar conclusion with logs and wal inspector and had just started diving in to the code and you already found it! 👏

Next time I will be faster! 😄

@timvisee timvisee merged commit c283b00 into dev Mar 20, 2025
17 checks passed
@timvisee timvisee deleted the fix-consensus-snapshot-resharding-state branch March 20, 2025 15:56
timvisee added a commit that referenced this pull request Mar 21, 2025
* Destruct struct when applying collection state

* In consensus snapshot, apply resharding state
@timvisee timvisee mentioned this pull request Mar 21, 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.

3 participants