-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Do not renew sync-id if all shards are sealed #29103
Conversation
Today the synced-flush always issues a new sync-id even though all shards haven't been changed since the last seal. This causes active shards to have different a sync-id from offline shards even though all were sealed and no writes since then. This commit adjusts not to renew sync-id if all active shards are sealed with the same sync-id. Closes elastic#27838
Pinging @elastic/es-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.
LGTM. I like how contained it is (i.e. not trying to cover all edge cases where some of the shards may have another seal id in place or trying to reuse the primary's sync id marker). I left some simple ask for testing. No need for another cycle
final ShardsSyncedFlushResult secondSeal = SyncedFlushUtil.attemptSyncedFlush(internalCluster(), shardId); | ||
assertThat(secondSeal.successfulShards(), equalTo(numberOfReplicas + 1)); | ||
assertThat(secondSeal.syncId(), equalTo(firstSeal.syncId())); | ||
// Shards were updated, renew synced flush |
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.
can we inject/remove the marker from one of the shards and see that the synced flush is re-applied?
Thanks @bleskes for reviewing. |
Today the synced-flush always issues a new sync-id even though all shards haven't been changed since the last seal. This causes active shards to have different a sync-id from offline shards even though all were sealed and no writes since then. This commit adjusts not to renew sync-id if all active shards are sealed with the same sync-id. Closes #27838
Today the synced-flush always issues a new sync-id even though all shards haven't been changed since the last seal. This causes active shards to have different a sync-id from offline shards even though all were sealed and no writes since then. This commit adjusts not to renew sync-id if all active shards are sealed with the same sync-id. Closes #27838
This reverts commit 25b4d9e.
Let re-enable this commit, then fix the BWC issue.
I misunderstood how the bwc versions works. If we backport to 5.x, we need to backport to all supported 6.*. This commit corrects the BWC versions for PreSyncedFlushResponse. Relates #29103
Today the synced-flush always issues a new sync-id even though all shards haven't been changed since the last seal. This causes active shards to have different a sync-id from offline shards even though all were sealed and no writes since then. This commit adjusts not to renew sync-id if all active shards are sealed with the same sync-id. Closes #27838
I misunderstood how the bwc versions works. If we backport to 5.x, we need to backport to all supported 6.*. This commit corrects the BWC versions for PreSyncedFlushResponse. Relates #29103
I misunderstood how the bwc versions works. If we backport to 5.x, we need to backport to all supported 6.*. This commit corrects the BWC versions for PreSyncedFlushResponse. Relates #29103
Today the synced-flush always issues a new sync-id even though all shards haven't been changed since the last seal. This causes active shards to have different a sync-id from offline shards even though all were sealed and no writes since then. This commit adjusts not to renew sync-id if all active shards are sealed with the same sync-id. Closes #27838
Today the synced-flush always issues a new sync-id even though all shards haven't been changed since the last seal. This causes active shards to have different a sync-id from offline shards even though all were sealed and no writes since then. This commit adjusts not to renew sync-id if all active shards are sealed with the same sync-id. Closes #27838
Today the synced-flush always issues a new sync-id even though all
shards haven't been changed since the last seal. This causes active
shards to have different a sync-id from offline shards even though all
were sealed and no writes since then.
This commit adjusts not to renew sync-id if all active shards are sealed
with the same sync-id.
Closes #27838