-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Avoid expensive status update in LuceneOperator #134079
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-analytical-engine (Team:Analytics) |
martijnvg
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 👍
| sb.append(this.getClass().getSimpleName()).append("["); | ||
| sb.append("shards = ").append(sortedUnion(processedShards, sliceQueue.remainingShardsIdentifiers())); | ||
| sb.append("shards = ") | ||
| .append(sliceQueue.partitioningStrategies().keySet().stream().sorted().collect(Collectors.joining(",", "[", "]"))); |
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 think it was a mistake to stuff status-like-things things into toString. We have this information in the status already as a Map. Maybe we should just do getClass().getSimpleName() and call it good. If map_page_size isn't in the status we can put it there. This was all useful in a time before we had .status(). But we have it now and we don't need all the string stuff.
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 can look into this later.
|
@martijnvg @nik9000 Thanks! |

With doc_partitioning targeting large shards, updating the status of LuceneOperator can be expensive with many slices. This change uses the keys of the partitioning map instead of iterating over all slices in the queue.