summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2014-02-28 08:13:48 -0500
committermatt dannenberg <matt.dannenberg@10gen.com>2014-03-03 09:44:35 -0500
commit30074e8c048032c0c3cd3ebde349e83a3d56713a (patch)
tree2c4768fab6c1af246163115473dc7bd1de49e6c7 /src/mongo
parente499f7a2394c19494d55c5b68370a2e53c241778 (diff)
downloadmongo-30074e8c048032c0c3cd3ebde349e83a3d56713a.tar.gz
SERVER-12809 fix upgradechecker's index key size check
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/shell/shell_utils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp
index ce3cf42a7a0..c59d990b2eb 100644
--- a/src/mongo/shell/shell_utils.cpp
+++ b/src/mongo/shell/shell_utils.cpp
@@ -144,7 +144,8 @@ namespace mongo {
BSONObjSet keys;
getKeysForUpgradeChecking(index, doc, &keys);
for (BSONObjSet::const_iterator key = keys.begin(); key != keys.end(); ++key) {
- if (key->objsize() > 1024) {
+ // recreation of the logic in KeyV1::dataSize() and BtreeBucket<V>::getKeyMax()
+ if (key->objsize() + 1 > 1024) {
return BSON("" << true);
}
}