fix ci issues
This commit is contained in:
parent
d88e8d297a
commit
ec0d8409a3
|
@ -626,7 +626,7 @@ int32_t tsdbLoadFromImem(SMemTable *imem, int64_t suid, int64_t uid) {
|
||||||
// tsdbBuildDeleteSkyline
|
// tsdbBuildDeleteSkyline
|
||||||
size_t delSize = TARRAY_SIZE(pMemDelData);
|
size_t delSize = TARRAY_SIZE(pMemDelData);
|
||||||
if (delSize > 0) {
|
if (delSize > 0) {
|
||||||
TAOS_CHECK_GOTO(tsdbBuildDeleteSkyline(pTombData, 0, (int32_t)(delSize - 1), pSkyline), &lino, _exit);
|
TAOS_CHECK_EXIT(tsdbBuildDeleteSkyline(pTombData, 0, (int32_t)(delSize - 1), pSkyline));
|
||||||
iSkyline = taosArrayGetSize(pSkyline) - 1;
|
iSkyline = taosArrayGetSize(pSkyline) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -687,6 +687,9 @@ int32_t tsdbLoadFromImem(SMemTable *imem, int64_t suid, int64_t uid) {
|
||||||
STsdbRowKey tsdbRowKey = {0};
|
STsdbRowKey tsdbRowKey = {0};
|
||||||
tsdbRowGetKey(pMemRow, &tsdbRowKey);
|
tsdbRowGetKey(pMemRow, &tsdbRowKey);
|
||||||
|
|
||||||
|
STSDBRowIter iter = {0};
|
||||||
|
TAOS_CHECK_EXIT(tsdbRowIterOpen(&iter, pMemRow, pTSchema));
|
||||||
|
|
||||||
int32_t iCol = 0;
|
int32_t iCol = 0;
|
||||||
for (SColVal *pColVal = tsdbRowIterNext(&iter); pColVal && iCol < nCol; pColVal = tsdbRowIterNext(&iter), iCol++) {
|
for (SColVal *pColVal = tsdbRowIterNext(&iter); pColVal && iCol < nCol; pColVal = tsdbRowIterNext(&iter), iCol++) {
|
||||||
if (tSimpleHashGet(iColHash, &pColVal->cid, sizeof(pColVal->cid)) && COL_VAL_IS_VALUE(pColVal)) {
|
if (tSimpleHashGet(iColHash, &pColVal->cid, sizeof(pColVal->cid)) && COL_VAL_IS_VALUE(pColVal)) {
|
||||||
|
@ -2485,12 +2488,16 @@ static int32_t tsdbCacheGetBatchFromMem(STsdb *pTsdb, tb_uid_t uid, SArray *pLas
|
||||||
TAOS_CHECK_EXIT(tsdbRowIterOpen(&rowIter, pRow, pTSchema));
|
TAOS_CHECK_EXIT(tsdbRowIterOpen(&rowIter, pRow, pTSchema));
|
||||||
|
|
||||||
int32_t iCol = 0, jCol = 0, jnCol = TARRAY_SIZE(pLastArray);
|
int32_t iCol = 0, jCol = 0, jnCol = TARRAY_SIZE(pLastArray);
|
||||||
for (SColVal *pColVal = tsdbRowIterNext(&rowIter); pColVal && iCol < nCol && jCol < jnCol;
|
for (SColVal *pColVal = tsdbRowIterNext(&rowIter); pColVal && iCol < nCol && jCol < jnCol;) {
|
||||||
pColVal = tsdbRowIterNext(&rowIter), ++iCol) {
|
|
||||||
SLastCol *pTargetCol = &((SLastCol *)TARRAY_DATA(pLastArray))[jCol];
|
SLastCol *pTargetCol = &((SLastCol *)TARRAY_DATA(pLastArray))[jCol];
|
||||||
if (pColVal->cid < pTargetCol->colVal.cid) {
|
if (pColVal->cid < pTargetCol->colVal.cid) {
|
||||||
|
pColVal = tsdbRowIterNext(&rowIter), ++iCol;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (pColVal->cid > pTargetCol->colVal.cid) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
int32_t cmp_res = tRowKeyCompare(&pTargetCol->rowKey, &rowKey.key);
|
int32_t cmp_res = tRowKeyCompare(&pTargetCol->rowKey, &rowKey.key);
|
||||||
if (!IS_LAST_KEY(((SLastKey *)TARRAY_DATA(keyArray))[jCol])) {
|
if (!IS_LAST_KEY(((SLastKey *)TARRAY_DATA(keyArray))[jCol])) {
|
||||||
|
@ -2505,7 +2512,7 @@ static int32_t tsdbCacheGetBatchFromMem(STsdb *pTsdb, tb_uid_t uid, SArray *pLas
|
||||||
if (COL_VAL_IS_VALUE(pColVal)) {
|
if (COL_VAL_IS_VALUE(pColVal)) {
|
||||||
if (cmp_res <= 0) {
|
if (cmp_res <= 0) {
|
||||||
SLastCol lastCol = {
|
SLastCol lastCol = {
|
||||||
.rowKey = rowKey.key, .colVal = pTargetCol->colVal, .dirty = 1, .cacheStatus = TSDB_LAST_CACHE_VALID};
|
.rowKey = rowKey.key, .colVal = *pColVal, .dirty = 1, .cacheStatus = TSDB_LAST_CACHE_VALID};
|
||||||
TAOS_CHECK_GOTO(tsdbCacheReallocSLastCol(&lastCol, NULL), &lino, _exit);
|
TAOS_CHECK_GOTO(tsdbCacheReallocSLastCol(&lastCol, NULL), &lino, _exit);
|
||||||
|
|
||||||
tsdbCacheFreeSLastColItem(pTargetCol);
|
tsdbCacheFreeSLastColItem(pTargetCol);
|
||||||
|
@ -2526,6 +2533,10 @@ static int32_t tsdbCacheGetBatchFromMem(STsdb *pTsdb, tb_uid_t uid, SArray *pLas
|
||||||
}
|
}
|
||||||
|
|
||||||
++jCol;
|
++jCol;
|
||||||
|
|
||||||
|
if (jCol < jnCol && ((SLastCol *)TARRAY_DATA(pLastArray))[jCol].colVal.cid > pColVal->cid) {
|
||||||
|
pColVal = tsdbRowIterNext(&rowIter), ++iCol;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tsdbRowClose(&rowIter);
|
tsdbRowClose(&rowIter);
|
||||||
|
|
||||||
|
@ -2554,12 +2565,12 @@ static int32_t tsdbCacheGetBatchFromMem(STsdb *pTsdb, tb_uid_t uid, SArray *pLas
|
||||||
pColVal = tsdbRowIterNext(&rowIter), iCol++) {
|
pColVal = tsdbRowIterNext(&rowIter), iCol++) {
|
||||||
int32_t *pjCol = tSimpleHashGet(iColHash, &pColVal->cid, sizeof(pColVal->cid));
|
int32_t *pjCol = tSimpleHashGet(iColHash, &pColVal->cid, sizeof(pColVal->cid));
|
||||||
if (pjCol && COL_VAL_IS_VALUE(pColVal)) {
|
if (pjCol && COL_VAL_IS_VALUE(pColVal)) {
|
||||||
SLastCol *pTargetCol = &((SLastCol *)TARRAY_DATA(pLastArray))[jCol];
|
SLastCol *pTargetCol = &((SLastCol *)TARRAY_DATA(pLastArray))[*pjCol];
|
||||||
int32_t cmp_res = tRowKeyCompare(&pTargetCol->rowKey, &rowKey.key);
|
int32_t cmp_res = tRowKeyCompare(&pTargetCol->rowKey, &tsdbRowKey.key);
|
||||||
|
|
||||||
if (cmp_res <= 0) {
|
if (cmp_res <= 0) {
|
||||||
SLastCol lastCol = {
|
SLastCol lastCol = {
|
||||||
.rowKey = rowKey.key, .colVal = *pColVal, .dirty = 1, .cacheStatus = TSDB_LAST_CACHE_VALID};
|
.rowKey = tsdbRowKey.key, .colVal = *pColVal, .dirty = 1, .cacheStatus = TSDB_LAST_CACHE_VALID};
|
||||||
TAOS_CHECK_GOTO(tsdbCacheReallocSLastCol(&lastCol, NULL), &lino, _exit);
|
TAOS_CHECK_GOTO(tsdbCacheReallocSLastCol(&lastCol, NULL), &lino, _exit);
|
||||||
|
|
||||||
tsdbCacheFreeSLastColItem(pTargetCol);
|
tsdbCacheFreeSLastColItem(pTargetCol);
|
||||||
|
|
|
@ -335,7 +335,7 @@ int32_t tsdbMemTableSaveToCache(SMemTable *pMemTable, void *func) {
|
||||||
STbData *pTbData = pMemTable->aBucket[i];
|
STbData *pTbData = pMemTable->aBucket[i];
|
||||||
while (pTbData) {
|
while (pTbData) {
|
||||||
code = (*cb)(pMemTable, pTbData->suid, pTbData->uid);
|
code = (*cb)(pMemTable, pTbData->suid, pTbData->uid);
|
||||||
if (!code) {
|
if (code) {
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue