Skip to content

Commit fb05a2a

Browse files
Checkstyle
1 parent 829c69f commit fb05a2a

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ public void onResponse(Releasable response) {
674674
public void onFailure(Exception e) {
675675
// The failure of the first node-join publication does not imply that the join failed,
676676
// because it may be retried and eventually succeed
677-
if (!applierState.nodes().nodeExists(joinRequest.getSourceNode())) {
677+
if (applierState.nodes().nodeExists(joinRequest.getSourceNode()) == false) {
678678
logger.warn(
679679
() -> format(
680680
"received join request from [%s] but could not connect back to the joining node",

server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,18 +1492,13 @@ public void testDoesNotReportConnectBackProblemsDuringJoiningIfNodeIsInClusterSt
14921492

14931493
logger.info("--> removed [{}] but adding to master's cluster state", partitionedNode);
14941494
final ClusterNode leader = cluster.getAnyLeader();
1495-
leader.submitUpdateTask("updating cluster state",
1496-
cs -> {
1497-
ClusterState cs2 = ClusterState.builder(cs)
1498-
.nodes(DiscoveryNodes.builder(cs.nodes())
1499-
.add(partitionedNode.getLocalNode())
1500-
.build())
1501-
.build();
1502-
// Insert breakpoint here
1503-
return cs2;
1504-
},
1505-
(e) -> {}
1506-
);
1495+
leader.submitUpdateTask("updating cluster state", cs -> {
1496+
ClusterState cs2 = ClusterState.builder(cs)
1497+
.nodes(DiscoveryNodes.builder(cs.nodes()).add(partitionedNode.getLocalNode()).build())
1498+
.build();
1499+
// Insert breakpoint here
1500+
return cs2;
1501+
}, (e) -> {});
15071502

15081503
logger.info("--> healing [{}] but blocking handshakes", partitionedNode);
15091504
partitionedNode.heal();

0 commit comments

Comments
 (0)