From 6662067ef611debcb3816bff57bb557499ef3881 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 9 Mar 2022 10:39:14 +0000 Subject: [PATCH] more TDB --- source/libs/tdb/src/inc/tdbInt.h | 4 ++-- source/libs/tdb/src/inc/tdbPage.h | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/source/libs/tdb/src/inc/tdbInt.h b/source/libs/tdb/src/inc/tdbInt.h index 598b23f339..c6899d009e 100644 --- a/source/libs/tdb/src/inc/tdbInt.h +++ b/source/libs/tdb/src/inc/tdbInt.h @@ -71,8 +71,8 @@ static FORCE_INLINE int tdbCmprPgId(const void *p1, const void *p2) { #define TDB_IS_SAME_PAGE(pPgid1, pPgid2) (tdbCmprPgId(pPgid1, pPgid2) == 0) // pgsz_t -#define TDB_MIN_PGSIZE 512 -#define TDB_MAX_PGSIZE 65536 +#define TDB_MIN_PGSIZE 512 // 512B +#define TDB_MAX_PGSIZE 16777216 // 16M #define TDB_DEFAULT_PGSIZE 4096 #define TDB_IS_PGSIZE_VLD(s) (((s) >= TDB_MIN_PGSIZE) && ((s) <= TDB_MAX_PGSIZE)) diff --git a/source/libs/tdb/src/inc/tdbPage.h b/source/libs/tdb/src/inc/tdbPage.h index 403f193c4e..c01c2f36e1 100644 --- a/source/libs/tdb/src/inc/tdbPage.h +++ b/source/libs/tdb/src/inc/tdbPage.h @@ -40,21 +40,21 @@ struct SPage { u8 *pData; SPgid pgid; int pageSize; - - // Fields used by SPCache - TDB_PCACHE_PAGE - // Fields below used by pager and am SPageHdr *pPageHdr; SPageFooter *pPageFooter; - u16 *aCellIdx; - int kLen; - int vLen; - int maxLocal; - int minLocal; - int nOverflow; - void *apOvfl[4]; - int aiOvfl[4]; + + u16 *aCellIdx; + + int kLen; + int vLen; + int maxLocal; + int minLocal; + int nOverflow; + void *apOvfl[4]; + int aiOvfl[4]; + // Fields used by SPCache + TDB_PCACHE_PAGE }; // Macros -- GitLab