mirror of
https://github.com/actiontech/dble.git
synced 2026-05-12 17:39:21 -05:00
[inner-950] adjust the sequence of locks (cherry pick)
This commit is contained in:
@@ -345,8 +345,6 @@ public class ServerConnection extends FrontendConnection {
|
||||
String schema = rrs.getSchema();
|
||||
String table = rrs.getTable();
|
||||
try {
|
||||
//lock self meta
|
||||
ProxyMeta.getInstance().getTmManager().addMetaLock(schema, table, rrs.getSrcStatement());
|
||||
if (ClusterGeneralConfig.isUseZK()) {
|
||||
String nodeName = StringUtil.getFullName(schema, table);
|
||||
String ddlPath = KVPathUtil.getDDLPath();
|
||||
@@ -361,11 +359,12 @@ public class ServerConnection extends FrontendConnection {
|
||||
} else if (ClusterGeneralConfig.isUseGeneralCluster()) {
|
||||
ProxyMeta.getInstance().getTmManager().notifyClusterDDL(schema, table, rrs.getStatement());
|
||||
}
|
||||
//lock self meta
|
||||
ProxyMeta.getInstance().getTmManager().addMetaLock(schema, table, rrs.getSrcStatement());
|
||||
} catch (SQLNonTransientException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
ProxyMeta.getInstance().getTmManager().removeMetaLock(schema, table);
|
||||
throw new SQLNonTransientException(e.toString() + ",sql:" + rrs.getStatement());
|
||||
throw new SQLNonTransientException(e.getMessage() + ",sql:" + rrs.getStatement());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user