[SERVER-25006] Connection Pool ASIO must indicate use separately from non-error Created: 11/Jul/16  Updated: 08/Jan/24  Resolved: 15/Jul/16

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 3.2.7
Fix Version/s: 3.2.9, 3.3.10

Type: Bug Priority: Major - P3
Reporter: Mira Carey Assignee: Mira Carey
Resolution: Done Votes: 1
Labels: code-and-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Platforms 17 (07/15/16)
Participants:

 Description   

Connection Pool ASIO connects indications of success with indications of use, which causes the underlying connection pool to assume a connection is fresher than it may actually be (we said we did IO, but actually we just haven't caused an error).

Because the connection pool it self checks connections out, marks them ok and then checks them back in to trigger a refresh, this causes connections to always seem fresh, never be heartbeated and never check against minConnections for dropping. This will likely cause connections to stabilize at some high water mark, rather than dropping down to minConnections.



 Comments   
Comment by Githook User [ 15/Jul/16 ]

Author:

{u'username': u'hanumantmk', u'name': u'Jason Carey', u'email': u'jcarey@argv.me'}

Message: SERVER-25006 asio indicateUsed != indicateSuccess

Connection Pool ASIO connects indications of success with indications of use, which causes the
underlying connection pool to assume a connection is fresher than it may actually be (we said we did
IO, but actually we just haven't caused an error).

Because the connection pool it self checks connections out, marks them ok and then checks them back
in to trigger a refresh, this causes connections to always seem fresh, never be heartbeated and
never check against minConnections for dropping.

Change indicateSuccess to not also mean indicateUsed in conn pool asio and call indicateUsed where
needed manually in the one location where it's relevant.

(cherry picked from commit e39a2a87eaca8a573b8b1145cf520415904019f5)
Branch: v3.2
https://github.com/mongodb/mongo/commit/741d3086c7de16e6e11db058cb89b39981f2e569

Comment by Githook User [ 15/Jul/16 ]

Author:

{u'username': u'hanumantmk', u'name': u'Jason Carey', u'email': u'jcarey@argv.me'}

Message: SERVER-25006 asio indicateUsed != indicateSuccess

Connection Pool ASIO connects indications of success with indications of use, which causes the
underlying connection pool to assume a connection is fresher than it may actually be (we said we did
IO, but actually we just haven't caused an error).

Because the connection pool it self checks connections out, marks them ok and then checks them back
in to trigger a refresh, this causes connections to always seem fresh, never be heartbeated and
never check against minConnections for dropping.

Change indicateSuccess to not also mean indicateUsed in conn pool asio and call indicateUsed where
needed manually in the one location where it's relevant.
Branch: master
https://github.com/mongodb/mongo/commit/e39a2a87eaca8a573b8b1145cf520415904019f5

Generated at Thu Feb 08 04:08:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.