diff --git a/source/dnode/vnode/src/meta/metaTable.c b/source/dnode/vnode/src/meta/metaTable.c index e102744f33befaa4adf3171e9ce61c85e804062a..7a7bf6412cf711334ba2753b131de626af5673ef 100644 --- a/source/dnode/vnode/src/meta/metaTable.c +++ b/source/dnode/vnode/src/meta/metaTable.c @@ -506,7 +506,10 @@ int metaAddIndexToSTable(SMeta *pMeta, int64_t version, SVCreateStbReq *pReq) { metaDestroyTagIdxKey(pTagIdxKey); goto _err; } + + metaWLock(pMeta); tdbTbUpsert(pMeta->pTagIdx, pTagIdxKey, nTagIdxKey, NULL, 0, pMeta->txn); + metaULock(pMeta); metaDestroyTagIdxKey(pTagIdxKey); }