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 bug the engine might choose a replica with a smaller head size to be the source of truth for auto-salvage (backport #1114) #1117

Merged
merged 2 commits into from
May 31, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented May 31, 2024

More details are in the issue description of longhorn/longhorn#8659


This is an automatic backport of pull request #1114 done by [Mergify](https://mergify.com).

the source of truth for auto-salvage

longhorn-8659

Signed-off-by: Phan Le <[email protected]>
(cherry picked from commit fd668c9)
The old logic is that:
1. Filter replica candidates to keep only replicas which was modified
   within the last 5 seconds from the last modified replica
2. Then filter to keep only replicas with head size equals to the biggest
   one
3. Then pick a random replica from the set

The new logic:
1. Filter replica candiates to keep only replicas which was modified
   within the last 5 seconds from the last modified replica
2. Then filter to keep only replicas with head size equal to the biggest
   one
3. Then pick the last modified replica from the set

longhorn-8659
longhorn-8563

Signed-off-by: Phan Le <[email protected]>
(cherry picked from commit 15c1e89)
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