diff options
author | Misha Tyulenev <misha@mongodb.com> | 2017-11-13 18:03:13 -0500 |
---|---|---|
committer | Misha Tyulenev <misha@mongodb.com> | 2017-11-14 13:10:10 -0500 |
commit | f6d08a2e38cd27bd0e9a841a6ffc112ce0298d0f (patch) | |
tree | cdde3617ebf3e9ccf6c0e2cd66290a06ce3b7196 /src/mongo/db/read_concern.cpp | |
parent | 987932bcd0244b688eb3be02ad6945cd0628dc57 (diff) | |
download | mongo-f6d08a2e38cd27bd0e9a841a6ffc112ce0298d0f.tar.gz |
SERVER-31806 do not invariant on the error status in makeNoopWriteIfNeeded
Diffstat (limited to 'src/mongo/db/read_concern.cpp')
-rw-r--r-- | src/mongo/db/read_concern.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/read_concern.cpp b/src/mongo/db/read_concern.cpp index 38cb66eb22f..557c83c5f6a 100644 --- a/src/mongo/db/read_concern.cpp +++ b/src/mongo/db/read_concern.cpp @@ -176,8 +176,12 @@ Status makeNoopWriteIfNeeded(OperationContext* opCtx, LogicalTime clusterTime) { } lastAppliedOpTime = LogicalTime(replCoord->getMyLastAppliedOpTime().getTimestamp()); } - invariant(status.isOK()); - return status; + // This is when the noop write failed but the opLog caught up to clusterTime by replicating. + if (!status.isOK()) { + LOG(1) << "Reached clusterTime " << lastAppliedOpTime.toString() + << " but failed noop write due to " << status.toString(); + } + return Status::OK(); } } // namespace |