Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -532,17 +532,15 @@
this.panicMode.set(true);

this.openConnectionFuture = openConnectionExecutorService.submit(() -> {

HostSpec connectionHostSpecCopy = this.connectionHostSpec.get();
String connectedIpAddressCopy = this.connectedIpAddress.get();

if (connectionHostSpecCopy == null) {
if (this.connectionHostSpec == null) {

Check warning on line 535 in wrapper/src/main/java/software/amazon/jdbc/plugin/bluegreen/BlueGreenStatusMonitor.java

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Constant values

Condition `this.connectionHostSpec == null` is always `false`
this.connectionHostSpec.set(this.initialHostSpec);
connectionHostSpecCopy = this.initialHostSpec;
this.connectedIpAddress.set(null);
connectedIpAddressCopy = null;
this.connectionHostSpecCorrect.set(false);
}

HostSpec connectionHostSpecCopy = this.connectionHostSpec.get();
String connectedIpAddressCopy = this.connectedIpAddress.get();

try {

if (this.useIpAddress.get() && connectedIpAddressCopy != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -905,11 +905,7 @@ protected void registerIamHost(String connectHost, String iamHost) {

boolean differentNodeNames = connectHost != null && !connectHost.equals(iamHost);
if (differentNodeNames) {
boolean alreadyChangedName = this.iamHostSuccessfulConnects
.computeIfAbsent(connectHost, (key) -> ConcurrentHashMap.newKeySet())
.contains(iamHost);

if (!alreadyChangedName) {
if (!isAlreadySuccessfullyConnected(connectHost, iamHost)) {
this.greenNodeChangeNameTimes.computeIfAbsent(connectHost, (key) -> Instant.now());
LOGGER.finest(() -> Messages.get("bgd.greenNodeChangedName", new Object[] {connectHost, iamHost}));
}
Expand Down
Loading