fix(stream): decode bloom filter
This commit is contained in:
parent
25bb914ac1
commit
f49d91ac1a
|
@ -167,7 +167,7 @@ int32_t tqSnapWriterClose(STqSnapWriter** ppWriter, int8_t rollback) {
|
||||||
if (rollback) {
|
if (rollback) {
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
} else {
|
} else {
|
||||||
code = tdbCommit(pWriter->pTq->pMetaStore, &pWriter->txn);
|
code = tdbCommit(pWriter->pTq->pMetaDB, &pWriter->txn);
|
||||||
if (code) goto _err;
|
if (code) goto _err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -175,11 +175,15 @@ void updateInfoFillBlockData(SUpdateInfo *pInfo, SSDataBlock *pBlock, int32_t pr
|
||||||
maxTs = TMAX(maxTs, ts);
|
maxTs = TMAX(maxTs, ts);
|
||||||
SScalableBf *pSBf = getSBf(pInfo, ts);
|
SScalableBf *pSBf = getSBf(pInfo, ts);
|
||||||
if (pSBf) {
|
if (pSBf) {
|
||||||
tScalableBfPut(pSBf, &ts, sizeof(TSKEY));
|
SUpdateKey updateKey = {
|
||||||
|
.tbUid = tbUid,
|
||||||
|
.ts = ts,
|
||||||
|
};
|
||||||
|
tScalableBfPut(pSBf, &updateKey, sizeof(SUpdateKey));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TSKEY *pMaxTs = taosHashGet(pInfo->pMap, &tbUid, sizeof(int64_t));
|
TSKEY *pMaxTs = taosHashGet(pInfo->pMap, &tbUid, sizeof(int64_t));
|
||||||
if (pMaxTs == NULL || *pMaxTs > tbUid) {
|
if (pMaxTs == NULL || *pMaxTs > maxTs) {
|
||||||
taosHashPut(pInfo->pMap, &tbUid, sizeof(int64_t), &maxTs, sizeof(TSKEY));
|
taosHashPut(pInfo->pMap, &tbUid, sizeof(int64_t), &maxTs, sizeof(TSKEY));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,8 +137,10 @@ SBloomFilter *tBloomFilterDecode(SDecoder *pDecoder) {
|
||||||
if (tDecodeU64(pDecoder, pUnits + i) < 0) goto _error;
|
if (tDecodeU64(pDecoder, pUnits + i) < 0) goto _error;
|
||||||
}
|
}
|
||||||
if (tDecodeDouble(pDecoder, &pBF->errorRate) < 0) goto _error;
|
if (tDecodeDouble(pDecoder, &pBF->errorRate) < 0) goto _error;
|
||||||
pBF->hashFn1 = taosGetDefaultHashFunction(TSDB_DATA_TYPE_TIMESTAMP);
|
/*pBF->hashFn1 = taosGetDefaultHashFunction(TSDB_DATA_TYPE_TIMESTAMP);*/
|
||||||
pBF->hashFn2 = taosGetDefaultHashFunction(TSDB_DATA_TYPE_NCHAR);
|
/*pBF->hashFn2 = taosGetDefaultHashFunction(TSDB_DATA_TYPE_NCHAR);*/
|
||||||
|
pBF->hashFn1 = taosFastHash;
|
||||||
|
pBF->hashFn2 = taosDJB2Hash;
|
||||||
return pBF;
|
return pBF;
|
||||||
|
|
||||||
_error:
|
_error:
|
||||||
|
|
Loading…
Reference in New Issue