summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/btree
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2021-12-21 17:26:59 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-21 07:28:21 +0000
commitaa622e964899cc90486bb5d128d6ef125f060bc3 (patch)
treeaad4995915d9ca7d41fdb37a9da6568f7701aeb5 /src/third_party/wiredtiger/src/btree
parentc850eb0ea8bbc031c414cd16e239750c6a7c28d8 (diff)
downloadmongo-aa622e964899cc90486bb5d128d6ef125f060bc3.tar.gz
Import wiredtiger: c7c5dd6eaadabaa29e97f5cca1fb0fd04f76278f from branch mongodb-5.2
ref: 1244b67b9a..c7c5dd6eaa for: 5.2.0-rc2 WT-8514 Apply an explicit page size limit to FLCS pages
Diffstat (limited to 'src/third_party/wiredtiger/src/btree')
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_handle.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/btree/bt_handle.c b/src/third_party/wiredtiger/src/btree/bt_handle.c
index 16585f714e8..b76b0c19609 100644
--- a/src/third_party/wiredtiger/src/btree/bt_handle.c
+++ b/src/third_party/wiredtiger/src/btree/bt_handle.c
@@ -884,6 +884,20 @@ __btree_page_sizes(WT_SESSION_IMPL *session)
btree->allocsize);
/*
+ * FLCS leaf pages have a lower size limit than the default, because the size configures the
+ * bitmap data size and the timestamp data adds on to that. Each time window can be up to 63
+ * bytes and the total page size must not exceed 4G. Thus for an 8t table there can be 64M
+ * entries (so 64M of bitmap data and up to 63*64M == 4032M of time windows), less a bit for
+ * headers. For a 1t table there can be (64 7/8)M entries because the bitmap takes less space,
+ * but that corresponds to a configured page size of a bit over 8M. Consequently the absolute
+ * limit on the page size is 8M, but since pages this large make no sense and perform poorly
+ * even if they don't get bloated out with timestamp data, we'll cut down by a factor of 16 and
+ * set the limit to 128KB.
+ */
+ if (btree->type == BTREE_COL_FIX && btree->maxleafpage > 128 * WT_KILOBYTE)
+ WT_RET_MSG(session, EINVAL, "page size for fixed-length column store is limited to 128KB");
+
+ /*
* Default in-memory page image size for compression is 4x the maximum internal or leaf page
* size, and enforce the on-disk page sizes as a lower-limit for the in-memory image size.
*/