Skip to content

Commit d5759dc

Browse files
committed
Don't relocate scroll contexts
1 parent f5e4887 commit d5759dc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

server/src/main/java/org/elasticsearch/search/SearchService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,9 +1245,9 @@ private ReaderContext findReaderContext(ShardSearchContextId id, TransportReques
12451245
if (id.getSessionId().isEmpty()) {
12461246
throw new IllegalArgumentException("Session id must be specified");
12471247
}
1248-
// if (sessionId.equals(id.getSessionId()) == false) {
1249-
// throw new SearchContextMissingException(id);
1250-
// }
1248+
// if (sessionId.equals(id.getSessionId()) == false) {
1249+
// throw new SearchContextMissingException(id);
1250+
// }
12511251
final ReaderContext reader = activeReaders.get(id.readerContextId());
12521252
if (reader == null) {
12531253
throw new SearchContextMissingException(id);
@@ -1850,6 +1850,7 @@ public List<ReaderContext> getActiveContexts(ShardId shardId) {
18501850
return this.activeReaders.values()
18511851
.stream()
18521852
.filter(c -> c.singleSession() == false)
1853+
.filter(c -> c.scrollContext() == null)
18531854
.filter(c -> c.indexShard().shardId().equals(shardId))
18541855
.collect(Collectors.toList());
18551856
}

0 commit comments

Comments
 (0)