[SERVER-82234] Relax assertions in session_pooling.js Created: 16/Oct/23  Updated: 31/Oct/23  Resolved: 31/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.1, 7.2.0-rc0, 6.0.12, 7.0.4

Type: Bug Priority: Major - P3
Reporter: Wenqin Ye Assignee: Wenqin Ye
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.1, v7.0, v6.0
Sprint: Sharding NYC 2023-10-16, Sharding NYC 2023-10-30, Cluster Scalability 2023-11-13
Participants:
Linked BF Score: 15

 Description   

There is a bug where the AsyncTry future that internal transaction uses holds onto the internal transaction, and therefore the session that is created by the internal transaction, after the future returns a value. Since the session is only returned to the session pool, after the transaction is fully destroyed, if the next internal transaction is run quickly enough, it will see that there are no sessions in the session pool and create another one. This will result in there being two sessions in the session pool instead of one. 

It is difficult to guarantee that the future destroys the internal transaction before it returns a value, and so I think it is better just to relax the test to check that there are one or two sessions in the session pool instead of just one. 



 Comments   
Comment by Githook User [ 31/Oct/23 ]

Author:

{'name': 'Wenqin Ye', 'email': 'wenqin908@gmail.com', 'username': 'wenqinYe'}

Message: SERVER-82234: Relax assertions in session_pooling.js
Branch: v7.1
https://github.com/mongodb/mongo/commit/3933880bc32ddc5f9229f80d126926b18ef291e8

Comment by Githook User [ 31/Oct/23 ]

Author:

{'name': 'Wenqin Ye', 'email': 'wenqin908@gmail.com', 'username': 'wenqinYe'}

Message: SERVER-82234: Relax assertions in session_pooling.js
Branch: v6.0
https://github.com/mongodb/mongo/commit/ab4f2844911ce077073c0a8b12909ec21f61e362

Comment by Githook User [ 31/Oct/23 ]

Author:

{'name': 'Wenqin Ye', 'email': 'wenqin908@gmail.com', 'username': 'wenqinYe'}

Message: SERVER-82234: Relax assertions in session_pooling.js
Branch: v7.0
https://github.com/mongodb/mongo/commit/93f73fd9df22e21c14e4de22181a3719ee2f671e

Comment by Githook User [ 20/Oct/23 ]

Author:

{'name': 'Wenqin Ye', 'email': 'wenqin908@gmail.com', 'username': 'wenqinYe'}

Message: SERVER-82234: Relax assertions in session_pooling.js
Branch: master
https://github.com/mongodb/mongo/commit/8f0e9361b565e55d751554e9f18f29e32de9ffa1

Generated at Thu Feb 08 06:48:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.