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: avoid panic with "loosen-follower-log-revert" enabled #937

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Nov 17, 2023

Changelog

Fix: avoid panic with "loosen-follower-log-revert" enabled

Problem:

When "loosen-follower-log-revert" enabled, and a follower log gets
reverted, e.g., all raft-logs are removed from that follower, the leader
encounters a panic due to a debug_assert().

Solution:

  • Disable the assertion when this feature is enabled.

  • The test feature_loosen_follower_log_revert is also revised to reveal this
    bug.


This change is Reviewable

Problem:

When "loosen-follower-log-revert" enabled, and a follower log gets
reverted, e.g., all raft-logs are removed from that follower, the leader
encounters a panic due to a `debug_assert()`.

Solution:

- Disable the assertion when this feature is enabled.

- The test `feature_loosen_follower_log_revert` is also revised to reveal this
  bug.
@drmingdrmer drmingdrmer merged commit 7d469c3 into databendlabs:main Nov 17, 2023
25 checks passed
@drmingdrmer drmingdrmer deleted the 33-fix branch November 17, 2023 06:28
@drmingdrmer drmingdrmer mentioned this pull request Mar 9, 2024
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.

1 participant