-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Removing unnecessary state from DataStreamReindexTask #117942
Removing unnecessary state from DataStreamReindexTask #117942
Conversation
Pinging @elastic/es-data-management (Team:Data Management) |
How did we decide that the indices being affected aren't as important? (Just out of curiosity, not trying to undo this) |
This information will be used for reporting the status of the persistent task. We're trying not to expose backing index information in status -- I think we (the upgrade assistant) would rather report it as how much of the data stream is complete, without ever mentioning index names. Also, if we were to report index names we'd need to record each completed index in the cluster state, which would add to the burden on the master node without buying us anything. This way we just record the total number at the beginning of the task, and can compute how many are pending or in progress or completed on the fly. |
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
public void setInProgressIndices(List<String> inProgressIndices) { | ||
this.inProgress = inProgressIndices; | ||
public void reindexSucceeded() { | ||
inProgress.decrementAndGet(); |
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.
We should add asserts (in the future) that these decrementing actions never go negative
💚 Backport successful
|
DataStreamReindexTask currently hods onto lists of index names that are being processed. This is unnecessary for the status we are reporting, and overcomplicates things. This small cleanup PR changes those to counts instead. It also removes a no-longer-used ThreadPool reference.