diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2016-07-26 15:23:10 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2016-07-26 15:23:51 -0400 |
commit | 1febb4ceb0e59743b0a49af35db10c4c689aa130 (patch) | |
tree | 431445a395fd4fbd1e7c94bf1c4151bba714088d /src/mongo/rpc/metadata | |
parent | 7daf57f28f564329e92b8779cf12845776b958b3 (diff) | |
download | mongo-1febb4ceb0e59743b0a49af35db10c4c689aa130.tar.gz |
SERVER-24615 Add support for OperationContext in EgressMetadataHook
Diffstat (limited to 'src/mongo/rpc/metadata')
-rw-r--r-- | src/mongo/rpc/metadata/metadata_hook.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/rpc/metadata/metadata_hook.h b/src/mongo/rpc/metadata/metadata_hook.h index 888e324b297..2369fb8d47a 100644 --- a/src/mongo/rpc/metadata/metadata_hook.h +++ b/src/mongo/rpc/metadata/metadata_hook.h @@ -33,6 +33,7 @@ namespace mongo { class BSONObj; class BSONObjBuilder; struct HostAndPort; +class OperationContext; class Status; namespace rpc { @@ -52,8 +53,12 @@ public: /** * Writes to an outgoing request metadata object. This method must not throw or block on * database or network operations and can be called by multiple concurrent threads. + * + * txn may be null as writeRequestMetadata may be called on ASIO background threads, and may not + * have an OperationContext as a result. */ - virtual Status writeRequestMetadata(const HostAndPort& requestDestination, + virtual Status writeRequestMetadata(OperationContext* txn, + const HostAndPort& requestDestination, BSONObjBuilder* metadataBob) = 0; /** |