Merge branch 'feat/TS-4229' of github.com:taosdata/TDengine into feat/TS-4229
This commit is contained in:
commit
c3ab6940cd
|
@ -47,7 +47,7 @@ int32_t mndProcessQueryCompactRsp(SRpcMsg *pReq);
|
|||
SCompactObj *mndAcquireCompact(SMnode *pMnode, int64_t compactId);
|
||||
void mndReleaseCompact(SMnode *pMnode, SCompactObj *pCompact);
|
||||
|
||||
void mndCompactUpdate(SMnode *pMnode, SCompactObj *pCompact);
|
||||
void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -509,7 +509,7 @@ int32_t mndProcessQueryCompactRsp(SRpcMsg *pReq){
|
|||
}
|
||||
|
||||
//timer
|
||||
void mndCompactUpdate(SMnode *pMnode, SCompactObj *pCompact){
|
||||
void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact){
|
||||
void *pIter = NULL;
|
||||
|
||||
while (1) {
|
||||
|
@ -722,7 +722,7 @@ void mndCompactPullup(SMnode *pMnode) {
|
|||
int32_t *pCompactId = taosArrayGet(pArray, i);
|
||||
SCompactObj *pCompact = mndAcquireCompact(pMnode, *pCompactId);
|
||||
if (pCompact != NULL) {
|
||||
mndCompactUpdate(pMnode, pCompact);
|
||||
mndCompactSendProgressReq(pMnode, pCompact);
|
||||
mndSaveCompactProgress(pMnode, pCompact->compactId);
|
||||
}
|
||||
mndReleaseCompact(pMnode, pCompact);
|
||||
|
|
|
@ -110,6 +110,8 @@ int32_t tSerializeSCompactDetailObj(void *buf, int32_t bufLen, const SCompactDet
|
|||
if (tEncodeI32(&encoder, pObj->numberFileset) < 0) return -1;
|
||||
if (tEncodeI32(&encoder, pObj->finished) < 0) return -1;
|
||||
if (tEncodeI64(&encoder, pObj->startTime) < 0) return -1;
|
||||
if (tEncodeI32(&encoder, pObj->newNumberFileset) < 0) return -1;
|
||||
if (tEncodeI32(&encoder, pObj->newFinished) < 0) return -1;
|
||||
|
||||
tEndEncode(&encoder);
|
||||
|
||||
|
@ -132,6 +134,8 @@ int32_t tDeserializeSCompactDetailObj(void *buf, int32_t bufLen, SCompactDetailO
|
|||
if (tDecodeI32(&decoder, &pObj->numberFileset) < 0) return -1;
|
||||
if (tDecodeI32(&decoder, &pObj->finished) < 0) return -1;
|
||||
if (tDecodeI64(&decoder, &pObj->startTime) < 0) return -1;
|
||||
if (tDecodeI32(&decoder, &pObj->newNumberFileset) < 0) return -1;
|
||||
if (tDecodeI32(&decoder, &pObj->newFinished) < 0) return -1;
|
||||
|
||||
tEndDecode(&decoder);
|
||||
|
||||
|
@ -281,6 +285,9 @@ int32_t mndAddCompactDetailToTran(SMnode *pMnode, STrans *pTrans, SCompactObj* p
|
|||
compactDetail.newNumberFileset = -1;
|
||||
compactDetail.newFinished = -1;
|
||||
|
||||
mInfo("compact:%d, add compact detail to trans, vgId:%d, dnodeId:%d",
|
||||
pCompact->compactId, pVgroup->vgId, pVgid->dnodeId);
|
||||
|
||||
SSdbRaw *pVgRaw = mndCompactDetailActionEncode(&compactDetail);
|
||||
if (pVgRaw == NULL) return -1;
|
||||
if (mndTransAppendRedolog(pTrans, pVgRaw) != 0) {
|
||||
|
|
Loading…
Reference in New Issue