summaryrefslogtreecommitdiff
path: root/jstests/core/long_index_rename.js
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2019-06-23 15:23:36 -0400
committerGregory Wlodarek <gregory.wlodarek@mongodb.com>2019-06-24 20:20:56 -0400
commitb4449789236d69805bad9511d15e288bebaa9d95 (patch)
tree7447cdacc4e1f4897bf0034261f3d9382023b191 /jstests/core/long_index_rename.js
parentb855e5562dbf2404a7857c110dbb39b451bf13f3 (diff)
downloadmongo-b4449789236d69805bad9511d15e288bebaa9d95.tar.gz
SERVER-41694 Remove the restriction on collection name length
Diffstat (limited to 'jstests/core/long_index_rename.js')
-rw-r--r--jstests/core/long_index_rename.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/jstests/core/long_index_rename.js b/jstests/core/long_index_rename.js
index 06361a10cde..41e89825570 100644
--- a/jstests/core/long_index_rename.js
+++ b/jstests/core/long_index_rename.js
@@ -12,16 +12,8 @@
coll.save({a: i});
}
- // Compute maximum index name length for this collection under FCV 4.0.
- const maxNsLength = 127;
- const maxIndexNameLength = maxNsLength - (coll.getFullName() + ".$").length;
- jsTestLog('Max index name length under FCV 4.0 = ' + maxIndexNameLength);
-
- // Create an index with the longest name allowed for this collection.
- assert.commandWorked(coll.createIndex({a: 1}, {name: 'a'.repeat(maxIndexNameLength)}));
-
// Beginning with 4.2, index namespaces longer than 127 characters are acceptable.
- assert.commandWorked(coll.createIndex({b: 1}, {name: 'b'.repeat(maxIndexNameLength) + 1}));
+ assert.commandWorked(coll.createIndex({b: 1}, {name: 'a'.repeat(8192)}));
// Before 4.2, index namespace lengths were checked while renaming collections.
const dest = db.long_index_rename2;