Skip to content

Commit 8a5bd8a

Browse files
authored
Add one more consistency check in AsyncShardFetch (#96553) (#96556)
Relates #93632
1 parent b3ed4bf commit 8a5bd8a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/main/java/org/elasticsearch/gateway/AsyncShardFetch.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ public synchronized FetchResult<T> fetchData(DiscoveryNodes nodes, Set<String> i
111111
asyncFetch(discoNodesToFetch, fetchingRound);
112112
}
113113

114+
assert assertFetchingCountConsistent();
115+
114116
// if we are still fetching, return null to indicate it
115117
if (hasAnyNodeFetching()) {
116118
return new FetchResult<>(shardId, null, emptySet());

0 commit comments

Comments
 (0)