[GODRIVER-1296] Connecting to an MMAPv1 deployment with driver version 1.1.0 throws errors Created: 04/Sep/19 Updated: 27/Oct/23 Resolved: 10/Sep/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | CRUD |
| Affects Version/s: | 1.1.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tomer Yakir | Assignee: | Divjot Arora (Inactive) |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Description |
|
Connecting to deployments running mongodb with MMAPv1 with default client options errors indicating that the deployment doesn’t support retryWrites. The workaround is to explicitly turning off retryWrites by using SetRetryWrites(false) |
| Comments |
| Comment by Louisa Berger [ 10/Sep/19 ] | ||||||||||||||||||||||||||||||||||
|
Thank you for your investigation and clarification Divjot! We will implement a workaround in the automation agent code. Feel free to close out however you wish. For posterity – this spec has the rationale for this at the bottom: DRIVERS-699 | ||||||||||||||||||||||||||||||||||
| Comment by Divjot Arora (Inactive) [ 10/Sep/19 ] | ||||||||||||||||||||||||||||||||||
|
tomer.yakir I've done some more investigation and I think the driver is behaving as expected. As far as I can tell, this does not occur on MMAPv1 clusters for versions < 3.6. For versions >= 3.6, an MMAPv1 deployment reports wire version 6 and a non-zero logicalSessionTimeoutMinutes field in its isMaster responses. Because of this, the driver concludes that the deployment supports sessions and adds a txnNumber field when doing a write operation to set up a retryable write. However, MMAPv1 does not support transactions and the server returns error code 20 (IllegalOperation), which the driver catches and wraps as per This doesn't happen in the 1.0.0 driver because retryable writes were not on by default until the 1.1.0 release ( | ||||||||||||||||||||||||||||||||||
| Comment by Tomer Yakir [ 10/Sep/19 ] | ||||||||||||||||||||||||||||||||||
|
divjot.arora apologies for the confusion. The problem does not occur when connecting to <3.6 deployments. It does occur when connecting to MMAPv1 deployments (regardless of the version). | ||||||||||||||||||||||||||||||||||
| Comment by Louisa Berger [ 09/Sep/19 ] | ||||||||||||||||||||||||||||||||||
|
tomer.yakir Could you provide Divjot with more details for the repro? | ||||||||||||||||||||||||||||||||||
| Comment by Divjot Arora (Inactive) [ 09/Sep/19 ] | ||||||||||||||||||||||||||||||||||
|
louisa.berger Can you give some more details about this issue that I could use to write a repro? I'm running the following code using the master branch of the driver against a 3.4 server:
The insert sent to the server does not include a transaction number, which it would if the driver was setting up a retryable write.
| ||||||||||||||||||||||||||||||||||
| Comment by Louisa Berger [ 06/Sep/19 ] | ||||||||||||||||||||||||||||||||||
|
Thanks Divjot! | ||||||||||||||||||||||||||||||||||
| Comment by Divjot Arora (Inactive) [ 06/Sep/19 ] | ||||||||||||||||||||||||||||||||||
|
louisa.berger Thanks for letting me know. I'm trying to figure out the issue today and am planning to put this into progress on Monday. | ||||||||||||||||||||||||||||||||||
| Comment by Louisa Berger [ 06/Sep/19 ] | ||||||||||||||||||||||||||||||||||
|
Hi divjot.arora, Wanted to call out that this bug is blocking us from upgrading the MongoDB Agent in Cloud to the 1.1.x driver, which we're eager to do so that we can start supporting the all paths index in Data Explorer. Is it possible to prioritize this fix so that we can upgrade soon? Thank you! |