Add clarifying comment on disrupted in-flight ops
This commit is contained in:
parent
4e1f62eae9
commit
2a9388912b
|
@ -818,17 +818,6 @@ public abstract class TransportReplicationAction<Request extends ReplicationRequ
|
||||||
assert setupShardReferenceAssertions();
|
assert setupShardReferenceAssertions();
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void assertAllShardReferencesAreCleaned() {
|
|
||||||
if (openShardReferences == null || openShardReferences.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
for (String desc : openShardReferences.values()) {
|
|
||||||
sb.append(desc).append("\n");
|
|
||||||
}
|
|
||||||
assert sb.length() == 0 : "Found unclosed shard references:\n" + sb;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns a new reference to {@link IndexShard} to perform a primary operation. Released after performing primary operation locally
|
* returns a new reference to {@link IndexShard} to perform a primary operation. Released after performing primary operation locally
|
||||||
* and replication of the operation to all replica shards is completed / failed (see {@link ReplicationPhase}).
|
* and replication of the operation to all replica shards is completed / failed (see {@link ReplicationPhase}).
|
||||||
|
|
|
@ -141,12 +141,8 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase {
|
||||||
@Override
|
@Override
|
||||||
protected void beforeIndexDeletion() {
|
protected void beforeIndexDeletion() {
|
||||||
// some test may leave operations in flight
|
// some test may leave operations in flight
|
||||||
// try {
|
// this is because the disruption schemes swallow requests by design
|
||||||
//// assertBusy(() -> TransportReplicationAction.assertAllShardReferencesAreCleaned());
|
// as such, these operations will never be marked as finished
|
||||||
//// assertBusy(() -> super.beforeIndexDeletion());
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// throw new AssertionError(e);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> startCluster(int numberOfNodes) throws ExecutionException, InterruptedException {
|
private List<String> startCluster(int numberOfNodes) throws ExecutionException, InterruptedException {
|
||||||
|
|
Loading…
Reference in New Issue