未验证 提交 e304b32f 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #18609 from taosdata/fix/TS-2194_1

fix:in some cases, metadata may be received twice
...@@ -2594,9 +2594,9 @@ int tscProcessMultiTableMetaRsp(SSqlObj *pSql) { ...@@ -2594,9 +2594,9 @@ int tscProcessMultiTableMetaRsp(SSqlObj *pSql) {
STableMetaVgroupInfo p = {.pTableMeta = pTableMeta,}; STableMetaVgroupInfo p = {.pTableMeta = pTableMeta,};
size_t keyLen = strnlen(pMetaMsg->tableFname, TSDB_TABLE_FNAME_LEN); size_t keyLen = strnlen(pMetaMsg->tableFname, TSDB_TABLE_FNAME_LEN);
void* t = taosHashGet(pParentCmd->pTableMetaMap, pMetaMsg->tableFname, keyLen); void* t = taosHashGet(pParentCmd->pTableMetaMap, pMetaMsg->tableFname, keyLen);
assert(t == NULL); if(t == NULL) {
taosHashPut(pParentCmd->pTableMetaMap, pMetaMsg->tableFname, keyLen, &p, sizeof(STableMetaVgroupInfo));
taosHashPut(pParentCmd->pTableMetaMap, pMetaMsg->tableFname, keyLen, &p, sizeof(STableMetaVgroupInfo)); }
} else { } else {
freeMeta = true; freeMeta = true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册