-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix the earliest last modified age of translog issue. #64753
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
Conversation
|
Pinging @elastic/es-distributed (Team:Distributed) |
dnhatn
left a comment
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.
Thanks @howardhuanghua. I prefer fixing the issue when adding a translog stats instead.
|
Thanks @dnhatn , you mean add a extra check to |
|
Yes, but 0L is more appropriate than Long.MAX_VALUE for the timestamp of an empty translog. |
|
Hi @dnhatn, I have updated the change, please help to review again, thanks. |
dnhatn
left a comment
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.
Thanks @howardhuanghua. I left a small comment.
| this.uncommittedSizeInBytes += translogStats.uncommittedSizeInBytes; | ||
| this.earliestLastModifiedAge = | ||
| Math.min(this.earliestLastModifiedAge, translogStats.earliestLastModifiedAge); | ||
| if (this.earliestLastModifiedAge < 1) { |
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.
Let's use this.earliestLastModifiedAge == 0.
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.
Updated, thanks.
|
@elasticmachine ok to test |
dnhatn
left a comment
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. Thanks @howardhuanghua.
Currently translog's `earliest_last_modified_age` field is always 0 in `_nodes/stats` response.
Currently translog's `earliest_last_modified_age` field is always 0 in `_nodes/stats` response.
Currently translog's `earliest_last_modified_age` field is always 0 in `_nodes/stats` response.
Currently translog's
earliest_last_modified_agefield is always 0 in_nodes/statsresponse.