提交 158cf673 编写于 作者: S slguan

[TD-93] sort out error codes

上级 d3b3c4bf
...@@ -233,7 +233,7 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg) { ...@@ -233,7 +233,7 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg) {
STableMetaInfo *pTableMetaInfo = tscGetTableMetaInfoFromCmd(pCmd, pCmd->clauseIndex, 0); STableMetaInfo *pTableMetaInfo = tscGetTableMetaInfoFromCmd(pCmd, pCmd->clauseIndex, 0);
if (rpcMsg->code == TSDB_CODE_NOT_ACTIVE_TABLE || rpcMsg->code == TSDB_CODE_INVALID_TABLE_ID || if (rpcMsg->code == TSDB_CODE_NOT_ACTIVE_TABLE || rpcMsg->code == TSDB_CODE_INVALID_TABLE_ID ||
rpcMsg->code == TSDB_CODE_INVALID_VNODE_ID || rpcMsg->code == TSDB_CODE_NOT_ACTIVE_VNODE || rpcMsg->code == TSDB_CODE_INVALID_VNODE_ID || rpcMsg->code == TSDB_CODE_NOT_ACTIVE_VNODE ||
rpcMsg->code == TSDB_CODE_NETWORK_UNAVAIL || rpcMsg->code == TSDB_CODE_NOT_ACTIVE_SESSION || rpcMsg->code == TSDB_CODE_NETWORK_UNAVAIL || rpcMsg->code == TSDB_CODE_NOT_ACTIVE_TABLE ||
rpcMsg->code == TSDB_CODE_TABLE_ID_MISMATCH) { rpcMsg->code == TSDB_CODE_TABLE_ID_MISMATCH) {
/* /*
* not_active_table: 1. the virtual node may fail to create table, since the procedure of create table is asynchronized, * not_active_table: 1. the virtual node may fail to create table, since the procedure of create table is asynchronized,
......
此差异已折叠。
...@@ -147,8 +147,7 @@ void * mgmtGetNextDnode(void *pNode, SDnodeObj **pDnode) { ...@@ -147,8 +147,7 @@ void * mgmtGetNextDnode(void *pNode, SDnodeObj **pDnode) {
void mgmtProcessCfgDnodeMsg(SQueuedMsg *pMsg) { void mgmtProcessCfgDnodeMsg(SQueuedMsg *pMsg) {
SRpcMsg rpcRsp = {.handle = pMsg->thandle, .pCont = NULL, .contLen = 0, .code = 0, .msgType = 0}; SRpcMsg rpcRsp = {.handle = pMsg->thandle, .pCont = NULL, .contLen = 0, .code = 0, .msgType = 0};
if (mgmtCheckRedirect(pMsg->thandle)) return;
SCMCfgDnodeMsg *pCmCfgDnode = pMsg->pCont; SCMCfgDnodeMsg *pCmCfgDnode = pMsg->pCont;
if (pCmCfgDnode->ip[0] == 0) { if (pCmCfgDnode->ip[0] == 0) {
strcpy(pCmCfgDnode->ip, tsPrivateIp); strcpy(pCmCfgDnode->ip, tsPrivateIp);
...@@ -176,14 +175,14 @@ void mgmtProcessCfgDnodeMsg(SQueuedMsg *pMsg) { ...@@ -176,14 +175,14 @@ void mgmtProcessCfgDnodeMsg(SQueuedMsg *pMsg) {
} }
if (rpcRsp.code == TSDB_CODE_SUCCESS) { if (rpcRsp.code == TSDB_CODE_SUCCESS) {
mTrace("dnode:%s is configured by %s", pCmCfgDnode->ip, pMsg->pUser->user); mPrint("dnode:%s, is configured by %s", pCmCfgDnode->ip, pMsg->pUser->user);
} }
rpcSendResponse(&rpcRsp); rpcSendResponse(&rpcRsp);
} }
static void mgmtProcessCfgDnodeMsgRsp(SRpcMsg *rpcMsg) { static void mgmtProcessCfgDnodeMsgRsp(SRpcMsg *rpcMsg) {
mTrace("cfg vnode rsp is received"); mPrint("cfg vnode rsp is received");
} }
void mgmtProcessDnodeStatusMsg(SRpcMsg *rpcMsg) { void mgmtProcessDnodeStatusMsg(SRpcMsg *rpcMsg) {
......
...@@ -168,7 +168,7 @@ int32_t mgmtCreateUser(SAcctObj *pAcct, char *name, char *pass) { ...@@ -168,7 +168,7 @@ int32_t mgmtCreateUser(SAcctObj *pAcct, char *name, char *pass) {
} }
if (name[0] == 0 || pass[0] == 0) { if (name[0] == 0 || pass[0] == 0) {
return TSDB_CODE_INVALID_MSG; return TSDB_CODE_INVALID_MSG_CONTENT;
} }
SUserObj *pUser = mgmtGetUser(name); SUserObj *pUser = mgmtGetUser(name);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "tkey.h" #include "tkey.h"
#include "tlog.h" #include "tlog.h"
#include "taosdef.h" #include "taosdef.h"
#include "taoserror.h"
#include "tsocket.h" #include "tsocket.h"
#include "tsystem.h" #include "tsystem.h"
#include "tutil.h" #include "tutil.h"
...@@ -994,7 +995,7 @@ int tsCfgDynamicOptions(char *msg) { ...@@ -994,7 +995,7 @@ int tsCfgDynamicOptions(char *msg) {
int vint = 0; int vint = 0;
paGetToken(msg, &option, &olen); paGetToken(msg, &option, &olen);
if (olen == 0) return 0; if (olen == 0) return code;
paGetToken(option + olen + 1, &value, &vlen); paGetToken(option + olen + 1, &value, &vlen);
if (vlen == 0) if (vlen == 0)
......
...@@ -90,7 +90,7 @@ echo "logDir $LOG_DIR" >> $TAOS_CFG ...@@ -90,7 +90,7 @@ echo "logDir $LOG_DIR" >> $TAOS_CFG
echo "publicIp $NODE_IP" >> $TAOS_CFG echo "publicIp $NODE_IP" >> $TAOS_CFG
echo "internalIp $NODE_IP" >> $TAOS_CFG echo "internalIp $NODE_IP" >> $TAOS_CFG
echo "privateIp $NODE_IP" >> $TAOS_CFG echo "privateIp $NODE_IP" >> $TAOS_CFG
echo "dDebugFlag 135" >> $TAOS_CFG echo "dDebugFlag 199" >> $TAOS_CFG
echo "mDebugFlag 199" >> $TAOS_CFG echo "mDebugFlag 199" >> $TAOS_CFG
echo "sdbDebugFlag 199" >> $TAOS_CFG echo "sdbDebugFlag 199" >> $TAOS_CFG
echo "rpcDebugFlag 135" >> $TAOS_CFG echo "rpcDebugFlag 135" >> $TAOS_CFG
......
...@@ -31,3 +31,60 @@ endi ...@@ -31,3 +31,60 @@ endi
if $data01 != 192.168.0.1 then if $data01 != 192.168.0.1 then
return -1 return -1
endi endi
print =============== create dnodes
sql create dnode 192.168.0.2
sql show dnodes;
if $rows != 2 then
return -1
endi
if $data00 != 1 then
return -1
endi
if $data01 != 192.168.0.1 then
return -1
endi
if $data10 != 2 then
return -1
endi
if $data11 != 192.168.0.2 then
return -1
endi
sql show mnodes;
if $rows != 1 then
return -1
endi
if $data00 != 1 then
return -1
endi
if $data01 != 192.168.0.1 then
return -1
endi
print =============== create table
sql create database d1;
sql create database d2;
sql create database d3;
sql create database d4;
sql create database d5;
sql create table d1.t1 (ts timestamp, i int);
sql create table d2.t1 (ts timestamp, i int);
sql create table d3.t1 (ts timestamp, i int);
sql create table d4.t1 (ts timestamp, i int);
sql show dnodes;
if $data05 != 2 then
return -1
endi
if $data15 != 2 then
return -1
endi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册