diff options
author | Adam Midvidy <amidvidy@gmail.com> | 2015-06-10 09:04:01 -0400 |
---|---|---|
committer | Adam Midvidy <amidvidy@gmail.com> | 2015-06-16 16:25:38 -0400 |
commit | 2bf407c955f383a29d3d10fc6be273d9c6890961 (patch) | |
tree | 31fd0be5d44d1fff9fae387cc37ad5f9c82e544e /src/mongo/s/client | |
parent | b6b9e3ecd726bf9c36155e2dccd67f825a95800c (diff) | |
download | mongo-2bf407c955f383a29d3d10fc6be273d9c6890961.tar.gz |
SERVER-18236 send GLEStats over OP_COMMAND metadata object
Diffstat (limited to 'src/mongo/s/client')
-rw-r--r-- | src/mongo/s/client/sharding_connection_hook.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/s/client/sharding_connection_hook.cpp b/src/mongo/s/client/sharding_connection_hook.cpp index b6c334419a2..49e27684bfd 100644 --- a/src/mongo/s/client/sharding_connection_hook.cpp +++ b/src/mongo/s/client/sharding_connection_hook.cpp @@ -104,7 +104,11 @@ namespace { // For every DBClient created by mongos, add a hook that will capture the response from // commands we pass along from the client, so that we can target the correct node when // subsequent getLastError calls are made by mongos. - conn->setPostRunCommandHook(stdx::bind(&saveGLEStats, stdx::placeholders::_1, stdx::placeholders::_2)); + conn->setReplyMetadataReader([](const BSONObj& metadataObj, StringData hostString) + -> Status { + saveGLEStats(metadataObj, hostString); + return Status::OK(); + }); } // For every DBClient created by mongos, add a hook that will append impersonated users |