diff options
Diffstat (limited to 'src/mongo/db/repl/storage_interface_impl.cpp')
-rw-r--r-- | src/mongo/db/repl/storage_interface_impl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/repl/storage_interface_impl.cpp b/src/mongo/db/repl/storage_interface_impl.cpp index 5dd66d101d2..3c61a2de652 100644 --- a/src/mongo/db/repl/storage_interface_impl.cpp +++ b/src/mongo/db/repl/storage_interface_impl.cpp @@ -732,13 +732,16 @@ StatusWith<std::vector<BSONObj>> _findOrDeleteDocuments( "bounded collection scans only support forward scans"); } + auto collator = collection->getDefaultCollator(); boost::optional<RecordId> minRecord, maxRecord; if (!startKey.isEmpty()) { - minRecord = RecordId(record_id_helpers::keyForElem(startKey.firstElement())); + minRecord = + RecordId(record_id_helpers::keyForElem(startKey.firstElement(), collator)); } if (!endKey.isEmpty()) { - maxRecord = RecordId(record_id_helpers::keyForElem(endKey.firstElement())); + maxRecord = + RecordId(record_id_helpers::keyForElem(endKey.firstElement(), collator)); } planExecutor = isFind |