Add clarifying comment on disrupted in-flight ops

This commit is contained in:
Jason Tedor 2016-03-28 13:34:18 -04:00
parent 4e1f62eae9
commit 2a9388912b
2 changed files with 2 additions and 17 deletions

View File

@ -818,17 +818,6 @@ public abstract class TransportReplicationAction<Request extends ReplicationRequ
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
* and replication of the operation to all replica shards is completed / failed (see {@link ReplicationPhase}).

View File

@ -141,12 +141,8 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase {
@Override
protected void beforeIndexDeletion() {
// some test may leave operations in flight
// try {
//// assertBusy(() -> TransportReplicationAction.assertAllShardReferencesAreCleaned());
//// assertBusy(() -> super.beforeIndexDeletion());
// } catch (Exception e) {
// throw new AssertionError(e);
// }
// this is because the disruption schemes swallow requests by design
// as such, these operations will never be marked as finished
}
private List<String> startCluster(int numberOfNodes) throws ExecutionException, InterruptedException {