diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index a0c9744d1e598f7323327fbe085989ba5128cdd6..31cfb35edd02ec95d0e6af6b9808527cd5bcf245 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -4260,9 +4260,9 @@ static int32_t setCompactVnodeInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { if (pInfo->pCompactRange->end) { if (getTimeRange(&pQueryInfo->range, pInfo->pCompactRange->end, TK_LE, TSDB_TIME_PRECISION_NANO) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2); - } else { - pQueryInfo->range.ekey = INT64_MAX; } + } else { + pQueryInfo->range.ekey = INT64_MAX; } return TSDB_CODE_SUCCESS; } diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 32e68e335ed2b6890599fdbb669bee7297f26a19..a2a23abc3833e9ad7d0fb5f4a6347e40bd950baf 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -2060,8 +2060,8 @@ int tscBuildCompactMsg(SSqlObj *pSql, SSqlInfo *pInfo) { tlv->len = htonl(sizeof(int64_t) * 2); SQueryInfo* pQueryInfo = tscGetQueryInfo(pCmd); - *(int16_t*)tlv->value = htobe64(pQueryInfo->range.skey); - *(int16_t*)(tlv->value+sizeof(int64_t)) = htobe64(pQueryInfo->range.ekey); + *(int64_t*)tlv->value = htobe64(pQueryInfo->range.skey); + *(int64_t*)(tlv->value+sizeof(int64_t)) = htobe64(pQueryInfo->range.ekey); p += sizeof(*tlv) + sizeof(int64_t) * 2; diff --git a/src/mnode/src/mnodeDb.c b/src/mnode/src/mnodeDb.c index 34d0cdc6f0474ba4f8ae95ccd582e86ec94fdff8..3573ee0c98f5ea906021ab4b29f1fa431e15ec54 100644 --- a/src/mnode/src/mnodeDb.c +++ b/src/mnode/src/mnodeDb.c @@ -1346,7 +1346,8 @@ static int32_t mnodeCompact(SDbObj *pDb, SCompactMsg *pCompactMsg) { if (pVgroup == NULL) break; if (pVgroup->pDb == pDb && pVgroup->vgId == buf[i]) { skey = convertTimePrecision(skey, TSDB_TIME_PRECISION_NANO, pVgroup->pDb->cfg.precision); - ekey = convertTimePrecision(skey, TSDB_TIME_PRECISION_NANO, pVgroup->pDb->cfg.precision); + ekey = convertTimePrecision(ekey, TSDB_TIME_PRECISION_NANO, pVgroup->pDb->cfg.precision); + mInfo("vgId: %d send compact msg. start %"PRId64 " end %"PRId64, pVgroup->vgId, skey, ekey); mnodeSendCompactVgroupMsg(pVgroup, skey, ekey); mnodeDecVgroupRef(pVgroup); valid = true;