Skip to content

Commit 559c195

Browse files
committed
fix(db): don't send session down to createIndex command
1 parent 195be0b commit 559c195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/operations/db_ops.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ function createCreateIndexCommand(db, name, fieldOrSpec, options) {
746746
if (selector['unique'] == null) selector['unique'] = finalUnique;
747747

748748
// Remove any write concern operations
749-
const removeKeys = ['w', 'wtimeout', 'j', 'fsync', 'readPreference'];
749+
const removeKeys = ['w', 'wtimeout', 'j', 'fsync', 'readPreference', 'session'];
750750
for (let i = 0; i < removeKeys.length; i++) {
751751
delete selector[removeKeys[i]];
752752
}

0 commit comments

Comments
 (0)