diff options
Diffstat (limited to 'src/mongo/db/repl/collection_cloner.cpp')
| -rw-r--r-- | src/mongo/db/repl/collection_cloner.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/repl/collection_cloner.cpp b/src/mongo/db/repl/collection_cloner.cpp index fad3e712cdc..e6dac3b5f31 100644 --- a/src/mongo/db/repl/collection_cloner.cpp +++ b/src/mongo/db/repl/collection_cloner.cpp @@ -343,13 +343,13 @@ void CollectionCloner::_countCallback( } } + // The count command may return a negative value after an unclean shutdown, + // so we set it to zero here to avoid aborting the collection clone. + // Note that this count value is only used for reporting purposes. if (count < 0) { - _finishCallback({ErrorCodes::BadValue, - str::stream() << "Count call on collection " << _sourceNss.ns() << " from " - << _source.toString() - << " returned negative document count: " - << count}); - return; + warning() << "Count command returned negative value. Updating to 0 to allow progress " + "meter to function properly. "; + count = 0; } { |
