Skip to content

Commit de54812

Browse files
committed
pr comment: nitpick
Signed-off-by: Rishabh Maurya <[email protected]>
1 parent 0b7f80a commit de54812

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

server/src/main/java/org/opensearch/cluster/node/DiscoveryNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public static boolean isDedicatedWarmNode(Settings settings) {
136136
private final String hostName;
137137
private final String hostAddress;
138138
private final TransportAddress address;
139-
private TransportAddress streamAddress;
139+
private final TransportAddress streamAddress;
140140
private final Map<String, String> attributes;
141141
private final Version version;
142142
private final SortedSet<DiscoveryNodeRole> roles;

server/src/main/java/org/opensearch/cluster/service/ClusterApplierService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,19 +618,19 @@ private void applyChanges(UpdateTask task, ClusterState previousClusterState, Cl
618618

619619
protected void connectToNodesAndWait(ClusterState newClusterState) {
620620
// can't wait for an ActionFuture on the cluster applier thread, but we do want to block the thread here, so use a CountDownLatch.
621-
CountDownLatch countDownLatch = new CountDownLatch(1);
621+
final CountDownLatch countDownLatch = new CountDownLatch(1);
622622
nodeConnectionsService.connectToNodes(newClusterState.nodes(), countDownLatch::countDown);
623623
try {
624624
countDownLatch.await();
625625
} catch (InterruptedException e) {
626626
logger.debug("interrupted while connecting to nodes, continuing", e);
627627
Thread.currentThread().interrupt();
628628
}
629-
countDownLatch = new CountDownLatch(1);
629+
final CountDownLatch streamNodeLatch = new CountDownLatch(1);
630630
if (streamNodeConnectionsService != null) {
631-
streamNodeConnectionsService.connectToNodes(newClusterState.nodes(), countDownLatch::countDown);
631+
streamNodeConnectionsService.connectToNodes(newClusterState.nodes(), streamNodeLatch::countDown);
632632
try {
633-
countDownLatch.await();
633+
streamNodeLatch.await();
634634
} catch (InterruptedException e) {
635635
logger.debug("interrupted while connecting to nodes, continuing", e);
636636
Thread.currentThread().interrupt();

0 commit comments

Comments
 (0)