commit
593a10d81d
|
@ -433,7 +433,7 @@ int32_t* taosGetErrno();
|
|||
|
||||
//mnode-compact
|
||||
#define TSDB_CODE_MND_INVALID_COMPACT_ID TAOS_DEF_ERROR_CODE(0, 0x04B1)
|
||||
|
||||
#define TSDB_CODE_MND_COMPACT_DETAIL_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x04B2)
|
||||
|
||||
// vnode
|
||||
// #define TSDB_CODE_VND_ACTION_IN_PROGRESS TAOS_DEF_ERROR_CODE(0, 0x0500) // 2.x
|
||||
|
|
|
@ -5238,11 +5238,11 @@ int32_t tDeserializeSQueryCompactProgressRsp(void *buf, int32_t bufLen, SQueryCo
|
|||
|
||||
if (tStartDecode(&decoder) < 0) return -1;
|
||||
|
||||
if (tDecodeI32(&decoder, &pReq->compactId) < 0) return -1;
|
||||
if (tDecodeI32(&decoder, &pReq->vgId) < 0) return -1;
|
||||
if (tDecodeI32(&decoder, &pReq->dnodeId) < 0) return -1;
|
||||
if (tDecodeI32(&decoder, &pReq->numberFileset) < 0) return -1;
|
||||
if (tDecodeI32(&decoder, &pReq->finished) < 0) return -1;
|
||||
if (tDecodeI32(&decoder, &pReq->compactId) < 0) return -2;
|
||||
if (tDecodeI32(&decoder, &pReq->vgId) < 0) return -3;
|
||||
if (tDecodeI32(&decoder, &pReq->dnodeId) < 0) return -4;
|
||||
if (tDecodeI32(&decoder, &pReq->numberFileset) < 0) return -5;
|
||||
if (tDecodeI32(&decoder, &pReq->finished) < 0) return -6;
|
||||
|
||||
tEndDecode(&decoder);
|
||||
tDecoderClear(&decoder);
|
||||
|
|
|
@ -490,13 +490,17 @@ static int32_t mndUpdateCompactProgress(SMnode *pMnode, SRpcMsg *pReq, int32_t c
|
|||
sdbRelease(pMnode->pSdb, pDetail);
|
||||
}
|
||||
|
||||
return -1;
|
||||
return TSDB_CODE_MND_COMPACT_DETAIL_NOT_EXIST;
|
||||
}
|
||||
|
||||
int32_t mndProcessQueryCompactRsp(SRpcMsg *pReq){
|
||||
SQueryCompactProgressRsp req = {0};
|
||||
if (tDeserializeSQueryCompactProgressRsp(pReq->pCont, pReq->contLen, &req) != 0) {
|
||||
int32_t code = 0;
|
||||
code = tDeserializeSQueryCompactProgressRsp(pReq->pCont, pReq->contLen, &req);
|
||||
if (code != 0) {
|
||||
terrno = TSDB_CODE_INVALID_MSG;
|
||||
mError("failed to deserialize vnode-query-compact-progress-rsp, ret:%d, pCont:%p, len:%d",
|
||||
code, pReq->pCont, pReq->contLen);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -504,10 +508,10 @@ int32_t mndProcessQueryCompactRsp(SRpcMsg *pReq){
|
|||
req.compactId, req.vgId, req.dnodeId, req.numberFileset, req.finished);
|
||||
|
||||
SMnode *pMnode = pReq->info.node;
|
||||
int32_t code = -1;
|
||||
|
||||
|
||||
if(mndUpdateCompactProgress(pMnode, pReq, req.compactId, &req) != 0){
|
||||
code = mndUpdateCompactProgress(pMnode, pReq, req.compactId, &req);
|
||||
if(code != 0){
|
||||
terrno = code;
|
||||
mError("compact:%d, failed to update progress, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d",
|
||||
req.compactId, req.vgId, req.dnodeId, req.numberFileset, req.finished);
|
||||
return -1;
|
||||
|
|
|
@ -329,6 +329,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_VIEW_NOT_EXIST, "view not exists in db
|
|||
|
||||
//mnode-compact
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_COMPACT_ID, "Invalid compact id")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_MND_COMPACT_DETAIL_NOT_EXIST, "compact detail doesn't exist")
|
||||
|
||||
// dnode
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_OFFLINE, "Dnode is offline")
|
||||
|
|
Loading…
Reference in New Issue