summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2022-04-01 18:16:12 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-01 19:53:50 +0000
commit0c2e3ff94757054b976390b2060a86bfa7dd086c (patch)
tree5a7425addb8f350a6d88c215e91f17b92ecb49ba
parent4fc0b12aad91e2aae74cc98ccfa5b35262e3c4ba (diff)
downloadmongo-0c2e3ff94757054b976390b2060a86bfa7dd086c.tar.gz
SERVER-65100 Increase block size for BSONColumn to be BSONObjMaxUserSize
-rw-r--r--src/mongo/bson/util/bsoncolumn.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/bson/util/bsoncolumn.cpp b/src/mongo/bson/util/bsoncolumn.cpp
index 82c08b884cd..4826d5291e2 100644
--- a/src/mongo/bson/util/bsoncolumn.cpp
+++ b/src/mongo/bson/util/bsoncolumn.cpp
@@ -43,8 +43,9 @@ namespace {
// Start capacity for memory blocks allocated by ElementStorage
constexpr int kStartCapacity = 128;
-// Max capacity for memory blocks allocated by ElementStorage
-constexpr int kMaxCapacity = 1024 * 32;
+// Max capacity for memory blocks allocated by ElementStorage. We need to allow blocks to grow to at
+// least BSONObjMaxUserSize so we can construct user objects efficiently.
+constexpr int kMaxCapacity = BSONObjMaxUserSize;
// Memory offset to get to BSONElement value when field name is an empty string.
constexpr int kElementValueOffset = 2;