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

[Remote Store] Sync segments in refresh listener on refresh after commit #10821

Closed
ashking94 opened this issue Oct 21, 2023 · 0 comments · Fixed by #10830
Closed

[Remote Store] Sync segments in refresh listener on refresh after commit #10821

ashking94 opened this issue Oct 21, 2023 · 0 comments · Fixed by #10830
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request Storage:Durability Issues and PRs related to the durability framework Storage:Remote v2.12.0 Issues and PRs related to version 2.12.0

Comments

@ashking94
Copy link
Member

ashking94 commented Oct 21, 2023

Is your feature request related to a problem? Please describe.
During replica to primary promotion, there is a case where the runAfterRefreshExactlyOnce is executed once while the syncSegments is not. The reason for this is that whenever the primary term changes, we are able to detect it by primary term check as below.

return this.primaryTerm != indexShard.getOperationPrimaryTerm()

However, the same check would not evaluate to true when the same condition is evaluated in syncSegments. This can lead to a state where the local refresh time and seq no gets updated, but the remote refresh time and seq no dont. It leads to continuous lag. Please note that this condition is mainly concerning the case when didRefresh is false and remote directory is non empty.

Describe the solution you'd like
In should sync method, we also check if this is a refresh after commit.

@ashking94 ashking94 added enhancement Enhancement or improvement to existing feature or request Storage:Durability Issues and PRs related to the durability framework Storage:Remote v2.12.0 Issues and PRs related to version 2.12.0 labels Oct 21, 2023
@ashking94 ashking94 self-assigned this Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Storage:Durability Issues and PRs related to the durability framework Storage:Remote v2.12.0 Issues and PRs related to version 2.12.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant