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(); 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}).

View File

@ -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 {