未验证 提交 19922cac 编写于 作者: M Minglei Jin 提交者: GitHub

Merge pull request #14699 from taosdata/fix/tdb-hash-negative

fix: use uint32_t instead of int to avoid negative hash result
......@@ -258,8 +258,8 @@ static void tdbPCacheUnpinPage(SPCache *pCache, SPage *pPage) {
}
static void tdbPCacheRemovePageFromHash(SPCache *pCache, SPage *pPage) {
SPage **ppPage;
int h;
SPage **ppPage;
uint32_t h;
h = tdbPCachePageHash(&(pPage->pgid));
for (ppPage = &(pCache->pgHash[h % pCache->nHash]); (*ppPage) && *ppPage != pPage; ppPage = &((*ppPage)->pHashNext))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册