-
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
Translog: make sure stats's op count and size are in sync #10041
Conversation
During translog flush there is a very small window where translog stats reports can be inconsistent.
LGTM |
@@ -466,6 +466,11 @@ public void syncOnEachOperation(boolean syncOnEachOperation) { | |||
|
|||
@Override | |||
public TranslogStats stats() { | |||
return new TranslogStats(estimatedNumberOfOperations(), translogSizeInBytes()); | |||
FsTranslogFile current1 = this.current; |
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 name this just current
I think this 1 is not necessary!
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.
fair enough. I used the same pattern used in the file in other places.
left one comment |
During translog flush there is a very small window where translog stats reports can be inconsistent. Closes #10041
During translog flush there is a very small window where translog stats reports can be inconsistent. Closes #10041
During translog flush there is a very small window where translog stats reports can be inconsistent. Closes elastic#10041
During translog flush there is a very small window where translog stats reports can be inconsistent.
Example: