File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -537,18 +537,13 @@ void CollectionCloner::_runQuery(const executor::TaskExecutor::CallbackArgs& cal
537537 return ;
538538 }
539539
540- // readOnce is available on 4.2 sync sources only. Initially we don't know FCV, so
541- // we won't use the readOnce feature, but once the admin database is cloned we will use it.
542- // The admin database is always cloned first, so all user data should use readOnce.
543- const bool readOnceAvailable = serverGlobalParams.featureCompatibility .getVersionUnsafe () ==
544- ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo42 ;
545540 try {
546541 _clientConnection->query (
547542 [this , onCompletionGuard](DBClientCursorBatchIterator& iter) {
548543 _handleNextBatch (onCompletionGuard, iter);
549544 },
550545 NamespaceStringOrUUID (_sourceNss.db ().toString (), *_options.uuid ),
551- readOnceAvailable ? QUERY (" query" << BSONObj () << " $readOnce" << true ) : Query ( ),
546+ QUERY (" query" << BSONObj () << " $readOnce" << true ),
552547 nullptr /* fieldsToReturn */ ,
553548 QueryOption_NoCursorTimeout | QueryOption_SlaveOk |
554549 (collectionClonerUsesExhaust ? QueryOption_Exhaust : 0 ),
You can’t perform that action at this time.
0 commit comments