enh: calculation of compact time offset

This commit is contained in:
Kaili Xu 2024-12-13 17:05:46 +08:00 committed by GitHub
parent 8bf5f3f62b
commit 60fdd0fe64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -957,7 +957,7 @@ static int32_t mndCompactDispatch(SRpcMsg *pReq) {
continue;
}
int64_t remainder = ((curMin + (int64_t)pDb->cfg.compactTimeOffset * 60LL) % pDb->cfg.compactInterval);
int64_t remainder = ((curMin - (int64_t)pDb->cfg.compactTimeOffset * 60LL) % pDb->cfg.compactInterval);
if (remainder != 0) {
mDebug("db:%p,%s, current time:%" PRIi64 "m is not divisible by compact interval:%dm, offset:%" PRIi8
"h, remainder:%" PRIi64 "m, skip",