You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added ServiceDisruptionScheme(s) and testAckedIndexing
This commit adds the notion of ServiceDisruptionScheme allowing for introducing disruptions in our test cluster. This
abstraction as used in a couple of wrappers around the functionality offered by MockTransportService to simulate various
network partions. There is also one implementation for causing a node to be slow in processing cluster state updates.
This new mechnaism is integrated into existing tests DiscoveryWithNetworkFailuresTests.
A new test called testAckedIndexing is added to verify retrieval of documents whose indexing was acked during various disruptions.
Closes#6505
Copy file name to clipboardExpand all lines: src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java
+6-11Lines changed: 6 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -340,7 +340,7 @@ public ClusterState execute(ClusterState currentState) {
340
340
341
341
@Override
342
342
publicvoidonFailure(Stringsource, Throwablet) {
343
-
logger.error("unexpected failure during [{}]", t, source);
343
+
logger.error("unexpected failure during [{}]", t, source);
344
344
}
345
345
346
346
@Override
@@ -406,8 +406,7 @@ public ClusterState execute(ClusterState currentState) {
406
406
publicvoidonFailure(Stringsource, Throwablet) {
407
407
if (tinstanceofClusterService.NoLongerMasterException) {
408
408
logger.debug("not processing {} leave request as we are no longer master", node);
409
-
}
410
-
else {
409
+
} else {
411
410
logger.error("unexpected failure during [{}]", t, source);
412
411
}
413
412
}
@@ -446,8 +445,7 @@ public ClusterState execute(ClusterState currentState) {
446
445
publicvoidonFailure(Stringsource, Throwablet) {
447
446
if (tinstanceofClusterService.NoLongerMasterException) {
448
447
logger.debug("not processing [{}] as we are no longer master", source);
449
-
}
450
-
else {
448
+
} else {
451
449
logger.error("unexpected failure during [{}]", t, source);
452
450
}
453
451
}
@@ -484,8 +482,7 @@ public ClusterState execute(ClusterState currentState) {
484
482
publicvoidonFailure(Stringsource, Throwablet) {
485
483
if (tinstanceofClusterService.NoLongerMasterException) {
486
484
logger.debug("not processing [{}] as we are no longer master", source);
487
-
}
488
-
else {
485
+
} else {
489
486
logger.error("unexpected failure during [{}]", t, source);
490
487
}
491
488
}
@@ -594,7 +591,7 @@ void handleNewClusterStateFromMaster(ClusterState newClusterState, final Publish
594
591
return;
595
592
}
596
593
if (master) {
597
-
logger.debug("received cluster state from [{}] which is also master but with cluster name [{}]", newClusterState.nodes().masterNode(), incomingClusterName);
594
+
logger.debug("received cluster state from [{}] which is also master but with cluster name [{}]", newClusterState.nodes().masterNode(), incomingClusterName);
0 commit comments