cache/skyline: fix skyline false condition
This commit is contained in:
parent
8ee1288611
commit
bb481c52b6
|
@ -825,7 +825,7 @@ int32_t tsdbCacheGetBatch(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCache
|
||||||
SLastCol *pLastCol = (SLastCol *)taosLRUCacheValue(pCache, h);
|
SLastCol *pLastCol = (SLastCol *)taosLRUCacheValue(pCache, h);
|
||||||
|
|
||||||
SLastCol lastCol = *pLastCol;
|
SLastCol lastCol = *pLastCol;
|
||||||
// reallocVarData(&lastCol.colVal);
|
reallocVarData(&lastCol.colVal);
|
||||||
taosArrayPush(pLastArray, &lastCol);
|
taosArrayPush(pLastArray, &lastCol);
|
||||||
|
|
||||||
if (h) {
|
if (h) {
|
||||||
|
@ -2151,12 +2151,16 @@ static bool tsdbKeyDeleted(TSDBKEY *key, SArray *pSkyline, int64_t *iSkyline) {
|
||||||
if (key->ts > pItemBack->ts) {
|
if (key->ts > pItemBack->ts) {
|
||||||
return false;
|
return false;
|
||||||
} else if (key->ts >= pItemFront->ts && key->ts <= pItemBack->ts) {
|
} else if (key->ts >= pItemFront->ts && key->ts <= pItemBack->ts) {
|
||||||
// if (key->version <= pItemFront->version || (key->ts == pItemBack->ts && key->version <= pItemBack->version)) {
|
if (key->version <= pItemFront->version || (key->ts == pItemBack->ts && key->version <= pItemBack->version)) {
|
||||||
if (key->version <= pItemFront->version || key->version <= pItemBack->version) {
|
// if (key->version <= pItemFront->version || key->version <= pItemBack->version) {
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
if (*iSkyline > 1) {
|
||||||
|
--*iSkyline;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (*iSkyline > 1) {
|
if (*iSkyline > 1) {
|
||||||
--*iSkyline;
|
--*iSkyline;
|
||||||
|
|
Loading…
Reference in New Issue