Skip to content

Commit 46e5f1c

Browse files
authored
Remove sync from ConnectionTarget#toString (#128656)
When introduced in #39629 we needed to acquire `mutex` here because the `toString()` result included a mutable field, but we dropped that field in #77295. This commit removes the now-unnecessary synchronization.
1 parent 21780e6 commit 46e5f1c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/src/main/java/org/elasticsearch/cluster/NodeConnectionsService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,7 @@ void disconnect() {
342342

343343
@Override
344344
public String toString() {
345-
synchronized (mutex) {
346-
return "ConnectionTarget{" + "discoveryNode=" + discoveryNode + '}';
347-
}
345+
return "ConnectionTarget{discoveryNode=" + discoveryNode + '}';
348346
}
349347
}
350348
}

0 commit comments

Comments
 (0)