Skip to content

Commit f627628

Browse files
Fix Missing Datanode Block in SearchableSnapshotsCanMatchOnCoordinatorIntegTests (#71819) (#71825)
We can't use `blockDataNode` because that only blocks on data files. In the corner case of having no documents in a shard (e.g. if test randomizes to 3 shards and 2 documents) this won't prevent the shard from being recovered because the empty segments file will be read from a repository metadata blob. -> fixed by blocking on any file closes #70501
1 parent e1498af commit f627628

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/SearchableSnapshotsCanMatchOnCoordinatorIntegTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ public void testQueryPhaseIsExecutedInAnAvailableNodeWhenAllShardsCanBeSkipped()
254254

255255
// Block the repository for the node holding the searchable snapshot shards
256256
// to delay its restore
257-
blockDataNode(repositoryName, dataNodeHoldingSearchableSnapshot);
257+
blockNodeOnAnyFiles(repositoryName, dataNodeHoldingSearchableSnapshot);
258258

259259
// Force the searchable snapshot to be allocated in a particular node
260260
Settings restoredIndexSettings = Settings.builder()

0 commit comments

Comments
 (0)