Merge pull request #3518 from actiontech/fix-pull-3494

inner 1959 - fix remaining bug
This commit is contained in:
wenyh
2022-12-06 14:49:20 +08:00
committed by GitHub
2 changed files with 8 additions and 10 deletions
@@ -100,22 +100,20 @@ public abstract class DefaultMultiNodeHandler extends MultiNodeHandler {
zeroReached = canResponse();
if (removed) {
this.setFail(closeReason);
handleConnectionClose(service, reason);
handleConnectionClose(responseService, rNode, reason);
}
} finally {
lock.unlock();
}
if (removed) {
session.getTargetMap().remove(rNode);
responseService.setResponseHandler(null);
if (zeroReached) {
finish(null);
}
if (removed && zeroReached) {
finish(null);
}
}
protected void handleConnectionClose(@NotNull AbstractService service, String reason) {
protected void handleConnectionClose(MySQLResponseService service, RouteResultsetNode rNode, String reason) {
session.getTargetMap().remove(rNode);
service.setResponseHandler(null);
}
protected abstract void finish(byte[] ok);
@@ -91,8 +91,8 @@ public abstract class AbstractXAHandler extends DefaultMultiNodeHandler {
}
@Override
public void handleConnectionClose(@NotNull AbstractService service, final String reason) {
currentStage.onConnectionClose((MySQLResponseService) service);
public void handleConnectionClose(MySQLResponseService service, RouteResultsetNode rNode, final String reason) {
currentStage.onConnectionClose(service);
}
@Override