提交 a0420f6f 编写于 作者: S slzhou

fix: compact time range - fix minor error

上级 e97bfe57
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册