-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Flush instead of synced-flush inactive shards #49126
Conversation
Pinging @elastic/es-distributed (:Distributed/Distributed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will still need the old sync-flush logic in 7.x to handle 6.x/7.x indices without soft-deletes as rolling/full cluster restarts are o.w. going to be painful.
Yes, we should keep this logic in 7.x. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think the flushing behavior should be backported to 7.x (and the sync-flush behavior kept in 7.x as well for non-soft-deletes indices)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
server/src/main/java/org/elasticsearch/index/shard/IndexShard.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/shard/IndexShard.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/indices/flush/FlushIT.java
Outdated
Show resolved
Hide resolved
Thanks @ywelsch and @henningandersen for reviewing. |
If all nodes are on 7.6, we prefer to perform a normal flush instead of synced flush when a shard becomes inactive. Backport of #49126
With peer recovery retention leases and sequence-number based replica allocation, a regular flush can speed up recovery as a synced-flush. With this change, we will flush instead of synced-flush when a shard becomes inactive.
Depends on #48430
Closes #31965