-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Only fsync global checkpoint if needed #27652
Only fsync global checkpoint if needed #27652
Conversation
In the global checkpoint sync action, we fsync the translog. However, the last synced global checkpoint might already be equal to the current global checkpoint in which case the fsyncing the translog is unnecessary as either the sync needed guard in the translog will skip the translog, or the translog needs an fsync for another reason that will be picked up elsewhere (e.g., at the end of a bulk request).
* master: Fix Lucene version for 6.2.0 constant in master TEST: Rewrite GeoPointParsingTests#testEqualsHashCodeContract (elastic#27634) [TEST] Check accounting breaker is equal to segment stats rather than 0 Fix term vectors generator with keyword and normalizer (elastic#27608) Fix highlighting on a keyword field that defines a normalizer (elastic#27604)
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
randomIntBetween(Math.toIntExact(SequenceNumbers.NO_OPS_PERFORMED), Math.toIntExact(globalCheckpoint) - 1); | ||
assert lastSyncedGlobalCheckpoint < globalCheckpoint; | ||
} else { | ||
lastSyncedGlobalCheckpoint = globalCheckpoint; |
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.
maybe make this lastSyncedGlobalCheckpoint = globalCheckpoint + randomIntBetween(0, 10);
?
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.
That's not realistic? The last synced global checkpoint being greater than the current global checkpoint?
In the global checkpoint sync action, we fsync the translog. However, the last synced global checkpoint might already be equal to the current global checkpoint in which case the fsyncing the translog is unnecessary as either the sync needed guard in the translog will skip the translog, or the translog needs an fsync for another reason that will be picked up elsewhere (e.g., at the end of a bulk request). Relates #27652
In the global checkpoint sync action, we fsync the translog. However, the last synced global checkpoint might already be equal to the current global checkpoint in which case the fsyncing the translog is unnecessary as either the sync needed guard in the translog will skip the translog, or the translog needs an fsync for another reason that will be picked up elsewhere (e.g., at the end of a bulk request). Relates #27652
In the global checkpoint sync action, we fsync the translog. However, the last synced global checkpoint might already be equal to the current global checkpoint in which case the fsyncing the translog is unnecessary as either the sync needed guard in the translog will skip the translog, or the translog needs an fsync for another reason that will be picked up elsewhere (e.g., at the end of a bulk request). Relates #27652
In the global checkpoint sync action, we fsync the translog. However, the last synced global checkpoint might already be equal to the current global checkpoint in which case the fsyncing the translog is unnecessary as either the sync needed guard in the translog will skip the translog, or the translog needs an fsync for another reason that will be picked up elsewhere (e.g., at the end of a bulk request).