未验证 提交 473338cf 编写于 作者: D dapan1121 提交者: GitHub

Merge pull request #18929 from taosdata/fix/percentile_crash

fix: fix invalid retrieved buffer page causing crash
......@@ -364,6 +364,7 @@ int32_t tMemBucketPut(tMemBucket *pBucket, const void *data, size_t size) {
assert(pSlot->info.data->num >= pBucket->elemPerPage && pSlot->info.size > 0);
// keep the pointer in memory
setBufPageDirty(pSlot->info.data, true);
releaseBufPage(pBucket->pBuffer, pSlot->info.data);
pSlot->info.data = NULL;
}
......@@ -505,6 +506,7 @@ double getPercentileImpl(tMemBucket *pMemBucket, int32_t count, double fraction)
SFilePage *pg = getBufPage(pMemBucket->pBuffer, *pageId);
tMemBucketPut(pMemBucket, pg->data, (int32_t)pg->num);
setBufPageDirty(pg, true);
releaseBufPage(pMemBucket->pBuffer, pg);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册