Merge pull request #20150 from taosdata/fix/TD-22710
fix: compact wrong data count
This commit is contained in:
commit
320ad8d1f2
|
@ -91,18 +91,18 @@ bool taosAssertRelease(bool condition);
|
||||||
#define ASSERT(condition)
|
#define ASSERT(condition)
|
||||||
#define ASSERTS(condition, ...) (0)
|
#define ASSERTS(condition, ...) (0)
|
||||||
#else
|
#else
|
||||||
#define ASSERTS(condition, ...) taosAssertDebug(condition, __FILE__, __LINE__, __VA_ARGS__)
|
#define ASSERTS(condition, ...) ((condition) ? false : taosAssertDebug(condition, __FILE__, __LINE__, __VA_ARGS__))
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#define ASSERT(condition) taosAssertRelease(condition)
|
#define ASSERT(condition) taosAssertRelease(condition)
|
||||||
#else
|
#else
|
||||||
#define ASSERT(condition) taosAssertDebug(condition, __FILE__, __LINE__, "assert info not provided")
|
#define ASSERT(condition) ASSERTS(condition, "assert info not provided")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void taosLogCrashInfo(char* nodeType, char* pMsg, int64_t msgLen, int signum, void *sigInfo);
|
void taosLogCrashInfo(char *nodeType, char *pMsg, int64_t msgLen, int signum, void *sigInfo);
|
||||||
void taosReadCrashInfo(char* filepath, char** pMsg, int64_t* pMsgLen, TdFilePtr* pFd);
|
void taosReadCrashInfo(char *filepath, char **pMsg, int64_t *pMsgLen, TdFilePtr *pFd);
|
||||||
void taosReleaseCrashLogFile(TdFilePtr pFile, bool truncateFile);
|
void taosReleaseCrashLogFile(TdFilePtr pFile, bool truncateFile);
|
||||||
int32_t taosGenCrashJsonMsg(int signum, char** pMsg, int64_t clusterId, int64_t startTime);
|
int32_t taosGenCrashJsonMsg(int signum, char **pMsg, int64_t clusterId, int64_t startTime);
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define uFatal(...) { if (uDebugFlag & DEBUG_FATAL) { taosPrintLog("UTL FATAL", DEBUG_FATAL, tsLogEmbedded ? 255 : uDebugFlag, __VA_ARGS__); }}
|
#define uFatal(...) { if (uDebugFlag & DEBUG_FATAL) { taosPrintLog("UTL FATAL", DEBUG_FATAL, tsLogEmbedded ? 255 : uDebugFlag, __VA_ARGS__); }}
|
||||||
|
@ -116,7 +116,7 @@ int32_t taosGenCrashJsonMsg(int signum, char** pMsg, int64_t clusterId, int64_t
|
||||||
#define pError(...) { taosPrintLog("APP ERROR ", DEBUG_ERROR, 255, __VA_ARGS__); }
|
#define pError(...) { taosPrintLog("APP ERROR ", DEBUG_ERROR, 255, __VA_ARGS__); }
|
||||||
#define pPrint(...) { taosPrintLog("APP ", DEBUG_INFO, 255, __VA_ARGS__); }
|
#define pPrint(...) { taosPrintLog("APP ", DEBUG_INFO, 255, __VA_ARGS__); }
|
||||||
// clang-format on
|
// clang-format on
|
||||||
//#define BUF_PAGE_DEBUG
|
// #define BUF_PAGE_DEBUG
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -190,9 +190,9 @@ int32_t tsdbDeleteTableData(STsdb *pTsdb, int64_t version, tb_uid_t suid, tb_uid
|
||||||
tsdbCacheDeleteLast(pTsdb->lruCache, pTbData->uid, eKey);
|
tsdbCacheDeleteLast(pTsdb->lruCache, pTbData->uid, eKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
tsdbInfo("vgId:%d, delete data from table suid:%" PRId64 " uid:%" PRId64 " skey:%" PRId64 " eKey:%" PRId64
|
tsdbTrace("vgId:%d, delete data from table suid:%" PRId64 " uid:%" PRId64 " skey:%" PRId64 " eKey:%" PRId64
|
||||||
" at version %" PRId64 " since %s",
|
" at version %" PRId64,
|
||||||
TD_VID(pTsdb->pVnode), suid, uid, sKey, eKey, version, tstrerror(code));
|
TD_VID(pTsdb->pVnode), suid, uid, sKey, eKey, version);
|
||||||
return code;
|
return code;
|
||||||
|
|
||||||
_err:
|
_err:
|
||||||
|
|
|
@ -1096,6 +1096,7 @@ int32_t tsdbBuildDeleteSkyline(SArray *aDelData, int32_t sidx, int32_t eidx, SAr
|
||||||
SArray *aTmpSkyline = taosArrayInit(dataNum * 2, sizeof(TSDBKEY));
|
SArray *aTmpSkyline = taosArrayInit(dataNum * 2, sizeof(TSDBKEY));
|
||||||
SArray *pSkyline = taosArrayInit(dataNum * 2, POINTER_BYTES);
|
SArray *pSkyline = taosArrayInit(dataNum * 2, POINTER_BYTES);
|
||||||
|
|
||||||
|
taosArrayClear(aSkyline);
|
||||||
for (int32_t i = sidx; i <= eidx; ++i) {
|
for (int32_t i = sidx; i <= eidx; ++i) {
|
||||||
pDelData = (SDelData *)taosArrayGet(aDelData, i);
|
pDelData = (SDelData *)taosArrayGet(aDelData, i);
|
||||||
taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->sKey, .version = pDelData->version});
|
taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->sKey, .version = pDelData->version});
|
||||||
|
|
|
@ -628,12 +628,14 @@ static int32_t vnodeProcessDropTtlTbReq(SVnode *pVnode, int64_t version, void *p
|
||||||
tqUpdateTbUidList(pVnode->pTq, tbUids, false);
|
tqUpdateTbUidList(pVnode->pTq, tbUids, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
// process
|
// process
|
||||||
ret = tsdbDoRetention(pVnode->pTsdb, ttlReq.timestamp);
|
ret = tsdbDoRetention(pVnode->pTsdb, ttlReq.timestamp);
|
||||||
if (ret) goto end;
|
if (ret) goto end;
|
||||||
|
|
||||||
ret = smaDoRetention(pVnode->pSma, ttlReq.timestamp);
|
ret = smaDoRetention(pVnode->pSma, ttlReq.timestamp);
|
||||||
if (ret) goto end;
|
if (ret) goto end;
|
||||||
|
#endif
|
||||||
|
|
||||||
end:
|
end:
|
||||||
taosArrayDestroy(tbUids);
|
taosArrayDestroy(tbUids);
|
||||||
|
|
Loading…
Reference in New Issue