-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add last refresh times and unwritten changes state to RefreshStats #111220
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
base: main
Are you sure you want to change the base?
Conversation
/** | ||
* Timestamp of the last refresh. | ||
*/ | ||
public long getLastRefreshTime() { |
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 decided to make these values timestamps rather than a duration (like timeSinceLastRefresh
) because from what I could tell timestamps are more widely used in the stats, but also because it was proving it be very difficult to write solid tests when the stat grows with time.
/** | ||
* Whether there are changes that need to be written to disk or not. | ||
*/ | ||
public boolean getHasUnwrittenChanges() { |
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 went back and forth between unwritten
and unrefreshed
and settled on unwritten
, but I'm happy to change it to unrefreshed
..!
Pinging @elastic/es-distributed (Team:Distributed) |
Pinging @elastic/es-distributed-obsolete (Team:Distributed (Obsolete)) |
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
Adds several fields to RefreshStats, including the last external and
internal refresh times, and a flag indicating if the shard has unwritten
changes.
Fixes #110852