-
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
Revert fast refresh using search shards #115019
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,8 @@ | |
import java.util.concurrent.ExecutionException; | ||
import java.util.concurrent.Executor; | ||
|
||
import static org.elasticsearch.index.IndexSettings.INDEX_FAST_REFRESH_SETTING; | ||
|
||
/** | ||
* This is a cache for {@link BitDocIdSet} based filters and is unbounded by size or time. | ||
* <p> | ||
|
@@ -103,7 +105,10 @@ static boolean shouldLoadRandomAccessFiltersEagerly(IndexSettings settings) { | |
boolean loadFiltersEagerlySetting = settings.getValue(INDEX_LOAD_RANDOM_ACCESS_FILTERS_EAGERLY_SETTING); | ||
boolean isStateless = DiscoveryNode.isStateless(settings.getNodeSettings()); | ||
if (isStateless) { | ||
return loadFiltersEagerlySetting && DiscoveryNode.hasRole(settings.getNodeSettings(), DiscoveryNodeRole.SEARCH_ROLE); | ||
return loadFiltersEagerlySetting | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was not sure whether to revert this part to its original state, as it was wrong. This has the discussion. Basically the cache should be loaded whenever the shard can be searched. But welcome feedback. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM |
||
&& (DiscoveryNode.hasRole(settings.getNodeSettings(), DiscoveryNodeRole.SEARCH_ROLE) | ||
|| (DiscoveryNode.hasRole(settings.getNodeSettings(), DiscoveryNodeRole.INDEX_ROLE) | ||
&& INDEX_FAST_REFRESH_SETTING.get(settings.getSettings()))); | ||
} else { | ||
return loadFiltersEagerlySetting; | ||
} | ||
|
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 have no idea how serverless upgrade tests are working and we'll see what CI says, but I suppose this can trip if a request is wrongly redirected in a mixed cluster.
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.
You're right, lets not risk it. I'll comment the assertion and add a TODO.