[SERVER-52748] mongos incorrectly reports "Only the first command in a transaction may specify API parameters" error Created: 10/Nov/20 Updated: 29/Oct/23 Resolved: 11/Nov/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Server version 4.9.0-alpha-464-g21b2bc7, which was downloaded from http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-latest.tgz |
||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Repl 2020-11-16 | ||||||||
| Participants: | |||||||||
| Description |
|
The Versioned API specification requires that clients only send API version-related fields on the first command in a transaction. But even for a properly-functioning client, mongos reports an error. Here's a mongo shell repro:
Note that the second insert command fails. I've also reproduced this in a POC in Java, and confirmed that the driver is not sending any server API elements on the second command in the transaction. |
| Comments |
| Comment by Githook User [ 11/Nov/20 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: |
| Comment by A. Jesse Jiryu Davis [ 11/Nov/20 ] |
|
Cause: 1. A client starts a transaction with a command that includes API parameters mongos shouldn't include the recalled API params with transaction-continuing commands it sends to shards. |