Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #6226] Shutdown flowMonitor when connection disconnect #6227

Merged
merged 5 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -53,7 +53,7 @@ public void updateSyncStateSetInfo(Set<String> newSyncStateSet) {
}

public boolean isMasterExist() {
return !this.masterAddress.isEmpty();
return masterAddress!=null && !this.masterAddress.isEmpty();
}

public String getClusterName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ public void run() {
try {
switch (this.currentState) {
case SHUTDOWN:
this.flowMonitor.shutdown(true);
return;
case READY:
if (!this.connectMaster()) {
Expand Down Expand Up @@ -339,6 +340,7 @@ public void run() {
}
}

this.flowMonitor.shutdown(true);
log.info(this.getServiceName() + " service end");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ public void run() {
log.error("", e);
}

flowMonitor.shutdown(true);

log.info(this.getServiceName() + " service end");
}

Expand Down Expand Up @@ -398,6 +400,8 @@ public void run() {
DefaultHAConnection.log.error("", e);
}

flowMonitor.shutdown(true);

DefaultHAConnection.log.info(this.getServiceName() + " service end");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ public void run() {
try {
switch (this.currentState) {
case SHUTDOWN:
this.flowMonitor.shutdown(true);
return;
case READY:
// Truncate invalid msg first
Expand Down Expand Up @@ -437,6 +438,8 @@ public void run() {
}
}

this.flowMonitor.shutdown(true);
LOGGER.info(this.getServiceName() + " service end");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ public void run() {
AutoSwitchHAConnection.LOGGER.error("", e);
}

flowMonitor.shutdown(true);

AutoSwitchHAConnection.LOGGER.info(this.getServiceName() + " service end");
}

Expand Down Expand Up @@ -739,6 +741,9 @@ public void run() {
} catch (IOException e) {
AutoSwitchHAConnection.LOGGER.error("", e);
}

flowMonitor.shutdown(true);

AutoSwitchHAConnection.LOGGER.info(this.getServiceName() + " service end");
}

Expand Down