-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Do not warm up searcher in engine constructor #48605
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 (:Distributed/Engine) |
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.
The change looks correct to me, but I'm not familiar enough with this part of the code to reason about potential implications, hopefully Henning or Yannick will be able to help here.
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.
Left one comment, o.w. looking good
server/src/main/java/org/elasticsearch/index/engine/InternalEngine.java
Outdated
Show resolved
Hide resolved
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
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.
Left two minor comments to consider.
Thanks everyone for reviewing. |
With this change, we won't warm up searchers until we externally refresh an engine. We explicitly refresh before allowing reading from a shard (i.e., move to post_recovery state) and during resetting. These guarantees that we have warmed up the engine before exposing the external searcher. Another prerequisite for #47186.
With this change, we won't warm up searchers until we externally refresh an engine. We explicitly refresh before allowing reading from a shard (i.e., move to post_recovery state) and during resetting. These guarantees that we have warmed up the engine before exposing the external searcher. Another prerequisite for #47186.
We do not guarantee that EngineTestCase#getDocIds is called after the engine has been externally refreshed. Hence, we trip an assertion assertSearcherIsWarmedUp. CI: https://gradle-enterprise.elastic.co/s/pm2at5qmfm2iu Relates #48605
We do not guarantee that EngineTestCase#getDocIds is called after the engine has been externally refreshed. Hence, we trip an assertion assertSearcherIsWarmedUp. CI: https://gradle-enterprise.elastic.co/s/pm2at5qmfm2iu Relates #48605
We do not guarantee that EngineTestCase#getDocIds is called after the engine has been externally refreshed. Hence, we trip an assertion assertSearcherIsWarmedUp. CI: https://gradle-enterprise.elastic.co/s/pm2at5qmfm2iu Relates #48605
This PR is another prerequisite for #47186.
With this change, we won't warm up searchers until we externally refresh an engine. We explicitly refresh before allowing reading from a shard (i.e., move to post_recovery state) and during resetting. These guarantees that we have warmed up the engine before exposing the external searcher.
Relates #47186