summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/collection_range_deleter.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-11-09 04:47:48 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-11-11 02:20:22 -0500
commitefea76aea1b32b56503a1ecb954f8e14b8415eae (patch)
treefba41ea476b4c423ea09a40d6026d40adf259362 /src/mongo/db/s/collection_range_deleter.cpp
parent77fbada9b93dfa474d41216baa19f556e75bc8ca (diff)
downloadmongo-efea76aea1b32b56503a1ecb954f8e14b8415eae.tar.gz
SERVER-31873 Make mongos retry findAndModify with txnNumber
Diffstat (limited to 'src/mongo/db/s/collection_range_deleter.cpp')
-rw-r--r--src/mongo/db/s/collection_range_deleter.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mongo/db/s/collection_range_deleter.cpp b/src/mongo/db/s/collection_range_deleter.cpp
index 66ed5783a95..7bf41703968 100644
--- a/src/mongo/db/s/collection_range_deleter.cpp
+++ b/src/mongo/db/s/collection_range_deleter.cpp
@@ -431,19 +431,16 @@ void CollectionRangeDeleter::_pop(Status result) {
// DeleteNotification
CollectionRangeDeleter::DeleteNotification::DeleteNotification()
- : notification(std::make_shared<Notification<Status>>()) {}
+ : _notification(std::make_shared<Notification<Status>>()) {}
CollectionRangeDeleter::DeleteNotification::DeleteNotification(Status status)
- : notification(std::make_shared<Notification<Status>>()) {
- notify(status);
-}
+ : _notification(std::make_shared<Notification<Status>>(std::move(status))) {}
Status CollectionRangeDeleter::DeleteNotification::waitStatus(OperationContext* opCtx) {
try {
- return notification->get(opCtx);
- } catch (...) {
- notification = std::make_shared<Notification<Status>>();
- notify({ErrorCodes::Interrupted, "Wait for range delete request completion interrupted"});
+ return _notification->get(opCtx);
+ } catch (const DBException& ex) {
+ _notification = std::make_shared<Notification<Status>>(ex.toStatus());
throw;
}
}