diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2022-04-01 18:16:12 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-08 19:20:31 +0000 |
commit | e24292c75094add4c13d64a5bff548206fa81a54 (patch) | |
tree | 70facd2da8faf348f9eb5c63e45083e1b8f88fac | |
parent | b0fd7b268a420fc79b7ab4ca358fdbffa434fbda (diff) | |
download | mongo-e24292c75094add4c13d64a5bff548206fa81a54.tar.gz |
SERVER-65100 Increase block size for BSONColumn to be BSONObjMaxUserSize
(cherry picked from commit 0c2e3ff94757054b976390b2060a86bfa7dd086c)
-rw-r--r-- | src/mongo/bson/util/bsoncolumn.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/bson/util/bsoncolumn.cpp b/src/mongo/bson/util/bsoncolumn.cpp index 7f1187c11f0..2cd21b25216 100644 --- a/src/mongo/bson/util/bsoncolumn.cpp +++ b/src/mongo/bson/util/bsoncolumn.cpp @@ -41,8 +41,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; |