fix(stream): array init error
This commit is contained in:
parent
0a46e6ee3b
commit
fc9c22b89c
|
@ -30,8 +30,7 @@ static void windowSBfAdd(SUpdateInfo *pInfo, uint64_t count) {
|
|||
count = pInfo->numSBFs;
|
||||
}
|
||||
for (uint64_t i = 0; i < count; ++i) {
|
||||
SScalableBf *tsSBF = tScalableBfInit(pInfo->interval * ROWS_PER_MILLISECOND,
|
||||
DEFAULT_FALSE_POSITIVE);
|
||||
SScalableBf *tsSBF = tScalableBfInit(pInfo->interval * ROWS_PER_MILLISECOND, DEFAULT_FALSE_POSITIVE);
|
||||
taosArrayPush(pInfo->pTsSBFs, &tsSBF);
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +92,7 @@ SUpdateInfo *updateInfoInit(int64_t interval, int32_t precision, int64_t waterma
|
|||
|
||||
uint64_t bfSize = (uint64_t)(pInfo->watermark / pInfo->interval);
|
||||
|
||||
pInfo->pTsSBFs = taosArrayInit(bfSize, sizeof(SScalableBf));
|
||||
pInfo->pTsSBFs = taosArrayInit(bfSize, sizeof(void *));
|
||||
if (pInfo->pTsSBFs == NULL) {
|
||||
updateInfoDestroy(pInfo);
|
||||
return NULL;
|
||||
|
@ -131,8 +130,7 @@ static SScalableBf* getSBf(SUpdateInfo *pInfo, TSKEY ts) {
|
|||
}
|
||||
SScalableBf *res = taosArrayGetP(pInfo->pTsSBFs, index);
|
||||
if (res == NULL) {
|
||||
res = tScalableBfInit(pInfo->interval * ROWS_PER_MILLISECOND,
|
||||
DEFAULT_FALSE_POSITIVE);
|
||||
res = tScalableBfInit(pInfo->interval * ROWS_PER_MILLISECOND, DEFAULT_FALSE_POSITIVE);
|
||||
taosArrayPush(pInfo->pTsSBFs, &res);
|
||||
}
|
||||
return res;
|
||||
|
|
Loading…
Reference in New Issue