feat:write meta from tmq to taosd

This commit is contained in:
wangmm0220 2022-07-08 18:51:51 +08:00
parent 6b46423a97
commit cefd65f69e
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ static void msg_process(TAOS_RES* msg) {
if (tmq_get_res_type(msg) == TMQ_RES_TABLE_META) { if (tmq_get_res_type(msg) == TMQ_RES_TABLE_META) {
tmq_raw_data *raw = tmq_get_raw_meta(msg); tmq_raw_data *raw = tmq_get_raw_meta(msg);
if(raw){ if(raw){
TAOS* pConn = taos_connect("localhost", "root", "taosdata", "abc1", 0); TAOS* pConn = taos_connect("192.168.1.86", "root", "taosdata", "abc1", 0);
if (pConn == NULL) { if (pConn == NULL) {
return; return;
} }
@ -68,7 +68,7 @@ int32_t init_env() {
return -1; return -1;
} }
TAOS_RES* pRes = taos_query(pConn, "create database if not exists abc1 vgroups 3"); TAOS_RES* pRes = taos_query(pConn, "create database if not exists abc1 vgroups 1");
if (taos_errno(pRes) != 0) { if (taos_errno(pRes) != 0) {
printf("error in create db, reason:%s\n", taos_errstr(pRes)); printf("error in create db, reason:%s\n", taos_errstr(pRes));
return -1; return -1;

View File

@ -2312,7 +2312,7 @@ static int32_t taosCreateStb(TAOS *taos, void *meta, int32_t metaLen){
pReq.source = 1; pReq.source = 1;
SName tableName; SName tableName;
tNameExtractFullName(toName(pTscObj->acctId, pRequest->pDb, "rname", &tableName), pReq.name); tNameExtractFullName(toName(pTscObj->acctId, pRequest->pDb, req.name, &tableName), pReq.name);
SCmdMsgInfo pCmdMsg = {0}; SCmdMsgInfo pCmdMsg = {0};
pCmdMsg.epSet = getEpSet_s(&pTscObj->pAppInfo->mgmtEp); pCmdMsg.epSet = getEpSet_s(&pTscObj->pAppInfo->mgmtEp);