process drop database rsp
This commit is contained in:
parent
a3241613d7
commit
84a7534256
|
@ -299,13 +299,13 @@ int32_t processDropDbRsp(void* param, const SDataBuf* pMsg, int32_t code) {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDropDbReq *req = pRequest->body.requestMsg.pData;
|
SDropDbRsp *rsp = (SDropDbRsp *)pMsg->pData;
|
||||||
|
|
||||||
SDbVgVersion dbVer = {0};
|
SDbVgVersion dbVer = {0};
|
||||||
struct SCatalog *pCatalog = NULL;
|
struct SCatalog *pCatalog = NULL;
|
||||||
|
|
||||||
strncpy(dbVer.dbName, req->db, sizeof(dbVer.dbName));
|
strncpy(dbVer.dbName, rsp->db, sizeof(dbVer.dbName));
|
||||||
dbVer.dbId = 0; //TODO GET DBID FROM RSP
|
dbVer.dbId = be64toh(rsp->uid);
|
||||||
|
|
||||||
catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog);
|
catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog);
|
||||||
|
|
||||||
|
|
|
@ -794,17 +794,12 @@ int32_t ctgValidateAndRemoveDbInfo(struct SCatalog* pCatalog, SDbVgVersion* targ
|
||||||
|
|
||||||
CTG_LOCK(CTG_WRITE, &info->lock);
|
CTG_LOCK(CTG_WRITE, &info->lock);
|
||||||
|
|
||||||
//TODO OPEN IT
|
|
||||||
#if 0
|
|
||||||
if (info->dbId != target->dbId) {
|
if (info->dbId != target->dbId) {
|
||||||
ctgInfo("db id already updated, db:%s, dbId:%"PRIx64 ", targetId:%"PRIx64, target->dbName, info->dbId, target->dbId);
|
ctgInfo("db id already updated, db:%s, dbId:%"PRIx64 ", targetId:%"PRIx64, target->dbName, info->dbId, target->dbId);
|
||||||
CTG_UNLOCK(CTG_WRITE, &info->lock);
|
CTG_UNLOCK(CTG_WRITE, &info->lock);
|
||||||
taosHashRelease(pCatalog->dbCache.cache, info);
|
taosHashRelease(pCatalog->dbCache.cache, info);
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
target->dbId = info->dbId;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (info->vgInfo) {
|
if (info->vgInfo) {
|
||||||
ctgInfo("cleanup db vgInfo, db:%s", target->dbName);
|
ctgInfo("cleanup db vgInfo, db:%s", target->dbName);
|
||||||
|
|
Loading…
Reference in New Issue