diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 22ddea557efb7de1a29b96a89e90161fa3c57b4e..3eecf799c1ce68a38eda9332fae03985652e6e96 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -333,7 +333,7 @@ int tscSendMsgToServer(SSqlObj *pSql) { .code = 0 }; - if ((rpcMsg.msgType == TSDB_MSG_TYPE_SUBMIT) && (tsShortcutFlag & TSDB_SHORTCUT_RPC_SEND_SUBMIT)) { + if ((rpcMsg.msgType == TSDB_MSG_TYPE_SUBMIT) && (tsShortcutFlag & TSDB_SHORTCUT_RB_RPC_SEND_SUBMIT)) { rpcFreeCont(rpcMsg.pCont); return TSDB_CODE_FAILED; } diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index b23e3f3e1c3abda326a09c2a6ba3a2ccb73ce066..301368b30b7eb02ae6b23f960a73cbf39284f411 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -417,10 +417,10 @@ do { \ #define TSDB_DEFAULT_STABLES_HASH_SIZE 100 #define TSDB_DEFAULT_CTABLES_HASH_SIZE 20000 -#define TSDB_SHORTCUT_RPC_SEND_SUBMIT 0x01u -#define TSDB_SHORTCUT_RPC_RECV_SUBMIT 0x02u -#define TSDB_SHORTCUT_VNODE_WAL_WRITE 0x04u -#define TSDB_SHORTCUT_TSDB_COMMIT 0x08u +#define TSDB_SHORTCUT_RB_RPC_SEND_SUBMIT 0x01u // RB: return before(global shortcut) +#define TSDB_SHORTCUT_RA_RPC_RECV_SUBMIT 0x02u // RA: return after(global shortcut) +#define TSDB_SHORTCUT_NR_VNODE_WAL_WRITE 0x04u // NR: no return and go on following actions(local shortcut) +#define TSDB_SHORTCUT_RB_TSDB_COMMIT 0x08u #define TSDB_PORT_DNODESHELL 0 #define TSDB_PORT_DNODEDNODE 5 diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 71ec468330a0b45c65f9b2c31f65bdcc445a9442..828749bf396549486f8c0f7a24c11029673e2b6c 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -1162,7 +1162,7 @@ static void rpcProcessIncomingMsg(SRpcConn *pConn, SRpcHead *pHead, SRpcReqConte switch (rpcMsg.msgType) { case TSDB_MSG_TYPE_SUBMIT: - if (tsShortcutFlag & TSDB_SHORTCUT_RPC_RECV_SUBMIT) { + if (tsShortcutFlag & TSDB_SHORTCUT_RA_RPC_RECV_SUBMIT) { SRpcMsg rMsg = {.handle = rpcMsg.handle, .pCont = NULL, .contLen = 0}; rpcSendResponse(&rMsg); rpcFreeCont(rpcMsg.pCont); diff --git a/src/tsdb/src/tsdbCommit.c b/src/tsdb/src/tsdbCommit.c index cd2ea7214a18a4565cc7eb00bcf6c747924ee981..8327f259f71e62c188183d2413d75a18451e2a72 100644 --- a/src/tsdb/src/tsdbCommit.c +++ b/src/tsdb/src/tsdbCommit.c @@ -98,7 +98,7 @@ void *tsdbCommitData(STsdbRepo *pRepo) { } tsdbStartCommit(pRepo); - if (tsShortcutFlag & TSDB_SHORTCUT_TSDB_COMMIT) { + if (tsShortcutFlag & TSDB_SHORTCUT_RB_TSDB_COMMIT) { tsdbEndCommit(pRepo, terrno); return NULL; } diff --git a/src/vnode/src/vnodeWrite.c b/src/vnode/src/vnodeWrite.c index a3464f75ba63fd3d40312ff966de1b50261cf7e0..8d2487168fa36a744af7e4aed01cb09447822036 100644 --- a/src/vnode/src/vnodeWrite.c +++ b/src/vnode/src/vnodeWrite.c @@ -103,7 +103,7 @@ int32_t vnodeProcessWrite(void *vparam, void *wparam, int32_t qtype, void *rpara } // write into WAL - if (!(tsShortcutFlag & TSDB_SHORTCUT_VNODE_WAL_WRITE)) { + if (!(tsShortcutFlag & TSDB_SHORTCUT_NR_VNODE_WAL_WRITE)) { code = walWrite(pVnode->wal, pHead); } if (code < 0) {