[SERVER-40757] Fix snapshot_read_kill_operations.js to handle read-only transactions that are aborted Created: 22/Apr/19  Updated: 29/Oct/23  Resolved: 13/May/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.1.12

Type: Bug Priority: Major - P3
Reporter: Matthew Saltz (Inactive) Assignee: Esha Maharishi (Inactive)
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-38931 Apply relevant changes to snapshot_re... Closed
is related to SERVER-40996 abortTransaction in cleanup_txns.js d... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2019-05-20
Participants:
Linked BF Score: 13

 Description   

It turns out that for read-only transactions, it is allowable that one shard commit and one shard abort, as long as the client receives an error (since "committing" for a read-only transaction doesn't do anything except wait for the data read to be majority committed). In this case, a read-only transaction was interrupted, causing one shard to commit and the other to abort. The test should be fixed to handle this case.



 Comments   
Comment by Esha Maharishi (Inactive) [ 13/May/19 ]

The second part of SERVER-40996 was reverted under https://github.com/mongodb/mongo/commit/9a77424deeae44452042eed2c50747bd127b1b48.

Comment by Githook User [ 13/May/19 ]

Author:

{'name': 'Esha Maharishi', 'username': 'EshaMaharishi', 'email': 'esha.maharishi@mongodb.com'}

Message: Revert "SERVER-40996 abortTransaction in cleanup_txns.js does not handle different errors from different shards"

This reverts commit ba844b4e81c3914b8a7017bd2a8c5ac4231c72ff.

SERVER-40757 Fix snapshot_read_kill_operations.js to handle read-only transactions that are aborted

The commit for SERVER-38369 made commands that return raw shard responses return the first non-ignorable error as the top-level error, even if different non-ignorable errors occurred.
Branch: master
https://github.com/mongodb/mongo/commit/9a77424deeae44452042eed2c50747bd127b1b48

Comment by Matthew Russotto [ 10/May/19 ]

Sounds OK to me.

Comment by Esha Maharishi (Inactive) [ 08/May/19 ]

matthew.russotto, just a heads up, I'm hoping to make abortTransaction choose the first non-ignorable error as the top-level error to fix this issue without requiring the test to look at the raw responses, so I may end up removing the changes from the second commit on SERVER-40996.

Comment by Matthew Russotto [ 08/May/19 ]

I fixed this for snapshot_read_kill_operations in SERVER-40996. Not closing because I do not believe this fixes random_moveChunk_broadcast*

Comment by Matthew Saltz (Inactive) [ 22/Apr/19 ]

This also applies for the random_moveChunk_broadcast* tests

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