mirror of
https://github.com/actiontech/dble.git
synced 2026-01-02 02:40:28 -06:00
* fix: inner 595 * fix: inner 595 * fix: inner 595
This commit is contained in:
@@ -129,15 +129,6 @@ public class RWSplitNonBlockingSession {
|
||||
this.conn = bindConn;
|
||||
}
|
||||
|
||||
public void unbindIfSafe(boolean safe) {
|
||||
if (safe) {
|
||||
this.conn.release();
|
||||
this.conn = null;
|
||||
} else {
|
||||
unbindIfSafe();
|
||||
}
|
||||
}
|
||||
|
||||
public void unbindIfSafe() {
|
||||
if (rwSplitService.isAutocommit() && !rwSplitService.isTxStart() && !rwSplitService.isLocked() &&
|
||||
!rwSplitService.isInLoadData() &&
|
||||
|
||||
@@ -71,7 +71,6 @@ public class RWSplitQueryHandler implements FrontendQueryHandler {
|
||||
case RwSplitServerParse.ROLLBACK:
|
||||
session.execute(true, (isSuccess, rwSplitService) -> {
|
||||
rwSplitService.setTxStart(false);
|
||||
rwSplitService.getSession().unbindIfSafe(true);
|
||||
session.getService().singleTransactionsCount();
|
||||
});
|
||||
break;
|
||||
@@ -109,11 +108,8 @@ public class RWSplitQueryHandler implements FrontendQueryHandler {
|
||||
case RwSplitServerParse.GRANT:
|
||||
case RwSplitServerParse.REVOKE:
|
||||
return (isSuccess, rwSplitService) -> {
|
||||
if (session.getService().isTxStart()) {
|
||||
rwSplitService.setTxStart(false);
|
||||
rwSplitService.getSession().unbindIfSafe(true);
|
||||
session.getService().singleTransactionsCount();
|
||||
}
|
||||
rwSplitService.setTxStart(false);
|
||||
session.getService().singleTransactionsCount();
|
||||
};
|
||||
default:
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user