[TD-3963]fix alter db bug when there is no vgroup case

This commit is contained in:
lichuang 2021-06-09 15:19:10 +08:00
parent e141eb9642
commit ee334d6f78
1 changed files with 8 additions and 1 deletions

View File

@ -1090,7 +1090,14 @@ static int32_t mnodeAlterDbFp(SMnodeMsg *pMsg) {
} }
// in case there is no vnode(no db in vnode) // in case there is no vnode(no db in vnode)
if (pMsg->expected == 0) { if (pMsg->expected == 0) {
return TSDB_CODE_SUCCESS; SSdbRow row = {
.type = SDB_OPER_GLOBAL,
.pTable = tsDbSdb,
.pObj = pDb,
.pMsg = pMsg,
};
return sdbUpdateRow(&row);
} }
mDebug("db:%s, all vgroups is altered", pDb->name); mDebug("db:%s, all vgroups is altered", pDb->name);
mLInfo("db:%s, is alterd by %s", pDb->name, mnodeGetUserFromMsg(pMsg)); mLInfo("db:%s, is alterd by %s", pDb->name, mnodeGetUserFromMsg(pMsg));