From f207fbc0afed1e934c8620c0d7659f4a44f6f262 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 20 Jan 2022 01:58:19 +0000 Subject: [PATCH] more tdb --- source/libs/tdb/src/db/tdb_mpool.c | 11 +++++++++++ source/libs/tdb/src/inc/tdb_mp.h | 1 + 2 files changed, 12 insertions(+) diff --git a/source/libs/tdb/src/db/tdb_mpool.c b/source/libs/tdb/src/db/tdb_mpool.c index 6d4f7c4bdc..f9a939b5e9 100644 --- a/source/libs/tdb/src/db/tdb_mpool.c +++ b/source/libs/tdb/src/db/tdb_mpool.c @@ -69,3 +69,14 @@ int tdbCloseMP(TDB_MPOOL *mp) { // TODO return 0; } + +int tdbMPFetchPage(TDB_MPOOL *mp, mp_pgid_t mpgid, void *p) { + // Search the hash + // TODO + return 0; +} + +int tdbMpUnfetchPage(TDB_MPOOL *mp, mp_pgid_t mpgid, void *p) { + // TODO + return 0; +} \ No newline at end of file diff --git a/source/libs/tdb/src/inc/tdb_mp.h b/source/libs/tdb/src/inc/tdb_mp.h index d4e7457b05..4a53c7b8d7 100644 --- a/source/libs/tdb/src/inc/tdb_mp.h +++ b/source/libs/tdb/src/inc/tdb_mp.h @@ -34,6 +34,7 @@ typedef struct MP_PAGE { // SRWLatch rwLatch; mp_pgid_t mpgid; uint8_t dirty; + uint8_t fileid[TDB_FILE_UID_LEN]; int32_t pinRef; TD_DLIST_NODE(MP_PAGE); char *page[]; -- GitLab