[DRIVERS-1953] Clarify if pinned connections can only be used for a single concurrent transaction when behind load-balancer Created: 14/Oct/21 Updated: 28/Oct/23 Resolved: 06/Jan/22 |
|
| Status: | Closed |
| Project: | Drivers |
| Component/s: | Load Balancer |
| Fix Version/s: | None |
| Type: | Spec Change | Priority: | Major - P3 |
| Reporter: | George Wangensteen | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Driver Changes: | Not Needed | ||||||||||||
| Description |
SummaryIn the specification for driver support for running MongoDB behind an L4 load-balancer, we specify connection-pinning rules for distributed transactions to ensure all transaction commands target the same service behind the load balancer. Specifically, we say: "When executing a transaction in load balancing mode, drivers MUST follow the rules outlined in Sharded Transactions with one exception: drivers MUST use the same connection for all commands in the transaction " I would like to clarify in the spec whether or not this implies that: "drivers MUST NOT use the same connection for two concurrent transactions run under different sessions from the same client" In other words, I wonder if the following situation possible: I believe the answer is "this is not possible", which means we could add to the spec a clarification that a pinned connection for a transaction will only run commands for that single transaction until it either commits or aborts.
|
| Comments |
| Comment by Githook User [ 05/Jan/22 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message: |
| Comment by Kevin Albertson [ 22/Dec/21 ] |
|
Apologies for the slow follow-up.
After a survey of drivers, the answer is "this is possible" in some drivers but does not agree with the intent of the specification. Opened https://github.com/mongodb/specifications/pull/1114 with the suggested clarification. |