diff options
author | Martin Neupauer <martin.neupauer@mongodb.com> | 2018-11-05 09:39:20 -0500 |
---|---|---|
committer | Martin Neupauer <martin.neupauer@mongodb.com> | 2018-11-09 13:55:19 -0500 |
commit | 1c2b3f3ad137758d6cc6275a61841b0836095d6b (patch) | |
tree | aa713aa42b1500f63d22fd9bd59f1fac261b36c2 /src/mongo/db/pipeline/document_source_exchange.cpp | |
parent | 625e4e2007fe31b9253976eb3815bcfd354a1cf6 (diff) | |
download | mongo-1c2b3f3ad137758d6cc6275a61841b0836095d6b.tar.gz |
SERVER-37613 Exchange error handling may deliver incorrect error code.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_exchange.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_exchange.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/document_source_exchange.cpp b/src/mongo/db/pipeline/document_source_exchange.cpp index 365f7073789..461e26b0109 100644 --- a/src/mongo/db/pipeline/document_source_exchange.cpp +++ b/src/mongo/db/pipeline/document_source_exchange.cpp @@ -235,8 +235,10 @@ DocumentSource::GetNextResult Exchange::getNext(OperationContext* opCtx, size_t for (;;) { // Execute only in case we have not encountered an error. - uassertStatusOKWithContext(_errorInLoadNextBatch, - "Exchange failed due to an error on different thread."); + if (!_errorInLoadNextBatch.isOK()) { + uasserted(ErrorCodes::ExchangePassthrough, + "Exchange failed due to an error on different thread."); + } // Check if we have a document. if (!_consumers[consumerId]->isEmpty()) { |