diff options
author | Jason Carey <jcarey@argv.me> | 2018-05-22 18:18:45 -0400 |
---|---|---|
committer | Jason Carey <jcarey@argv.me> | 2018-06-08 15:08:52 -0400 |
commit | afe78b2fd058c09a754653bf024744ee97392bc4 (patch) | |
tree | 2422581b55a32d5ad134d198b58413d9c360a99e /src/mongo/executor/connection_pool.h | |
parent | 2baf303830538053d3bfedaa99fec0c4b5e83cd8 (diff) | |
download | mongo-afe78b2fd058c09a754653bf024744ee97392bc4.tar.gz |
SERVER-35179 Make NiTL actually refresh
Diffstat (limited to 'src/mongo/executor/connection_pool.h')
-rw-r--r-- | src/mongo/executor/connection_pool.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mongo/executor/connection_pool.h b/src/mongo/executor/connection_pool.h index 87833953e5f..118f734920d 100644 --- a/src/mongo/executor/connection_pool.h +++ b/src/mongo/executor/connection_pool.h @@ -245,6 +245,17 @@ public: virtual void indicateFailure(Status status) = 0; /** + * This method updates a 'liveness' timestamp to avoid unnecessarily refreshing + * the connection. + * + * This method should be invoked whenever we perform an operation on the connection that must + * have done work. I.e. actual networking was performed. If a connection was checked out, then + * back in without use, one would expect an indicateSuccess without an indicateUsed. Only if we + * checked it out and did work would we call indicateUsed. + */ + virtual void indicateUsed() = 0; + + /** * The HostAndPort for the connection. This should be the same as the * HostAndPort passed to DependentTypeFactoryInterface::makeConnection. */ @@ -265,12 +276,6 @@ protected: private: /** - * This method updates a 'liveness' timestamp to avoid unnecessarily refreshing - * the connection. - */ - virtual void indicateUsed() = 0; - - /** * Returns the last used time point for the connection */ virtual Date_t getLastUsed() const = 0; |