-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Support real-time gets on hollow shards #122012
Conversation
server/src/main/java/org/elasticsearch/action/get/TransportGetAction.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/get/TransportGetFromTranslogAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/get/TransportGetAction.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/get/MultiGetShardResponse.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java
Outdated
Show resolved
Hide resolved
…tFomTranslogAction extendable" This reverts commit 3237dfa
…d didn't get a cluster update
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
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.
Looks good, I left a couple of comments
server/src/main/java/org/elasticsearch/action/get/TransportShardMultiGetAction.java
Show resolved
Hide resolved
@@ -154,7 +155,9 @@ protected Executor getExecutor(MultiGetShardRequest request, ShardId shardId) { | |||
final ClusterState clusterState = clusterService.state(); | |||
if (clusterState.metadata().index(shardId.getIndex()).isSystem()) { | |||
return threadPool.executor(executorSelector.executorForGet(shardId.getIndexName())); | |||
} else if (indicesService.indexServiceSafe(shardId.getIndex()).getIndexSettings().isSearchThrottled()) { | |||
} | |||
var indexService = indicesService.indexService(shardId.getIndex()); |
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.
why is this change needed?
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.
https://github.com/elastic/elasticsearch/pull/122012/files#r1950399319
I've seen an IndexNotFoundException
being thrown here during the stress testing of real-time gets which failed the request, because we don't expect it here. Let me double check if it's still the case.
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.
It used to be failing with something like
Caused by: java.lang.IllegalStateException: unexpected exception processing cluster state version [112] in context [ClusterStateObserver[null]]
at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.logUnexpectedException(ClusterStateObserver.java:317)
... 12 more
Caused by: [rjsadmjle/ScBnoey6QYqfReJ_JhmkhA] org.elasticsearch.index.IndexNotFoundException: no such index [rjsadmjle]
at org.elasticsearch.indices.IndicesService.indexServiceSafe(IndicesService.java:586)
at org.elasticsearch.action.get.TransportGetAction.getExecutor(TransportGetAction.java:169)
at org.elasticsearch.action.get.TransportGetAction.tryGetFromTranslog(TransportGetAction.java:297)
at org.elasticsearch.action.get.TransportGetAction.getFromTranslog(TransportGetAction.java:263)
at org.elasticsearch.action.get.TransportGetAction$1.onNewClusterState(TransportGetAction.java:241)
but it doesn't anymore, so I've reverted in in b965926
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 still see the change, maybe you forgot to change this branch?
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.
@arteam can we revert this change here (and in GET) if it's not needed? Before I approve.
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.
…t node" This reverts commit ff0c191.
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.
One final comment from me.
server/src/main/java/org/elasticsearch/action/get/TransportShardMultiGetAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/get/TransportShardMultiGetAction.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/get/TransportShardMultiGetAction.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/get/TransportShardMultiGetAction.java
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. Please ensure CI passes before merging.
getLastUnsafeSegmentGenerationForGets
for anyEngine
, not onlyInternalEngine
AlreadyClosedException
in case a shard's engine gets swapped.See ES-10571