[SERVER-37320] Prevent prepareTransaction from running on anything but initialized shard servers or config servers, except under failpoint Created: 26/Sep/18  Updated: 29/Oct/23  Resolved: 27/Sep/18

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

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Esha Maharishi (Inactive)
Resolution: Fixed Votes: 0
Labels: ShardedTxn:DistributedCommit
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-10-08
Participants:

 Description   

The failpoint is to allow testing prepareTransaction directly against an unsharded replica set, as many current tests do.

This patch should also turn the failpoint on in the suites that test prepareTransaction directly against an unsharded replica set.



 Comments   
Comment by Githook User [ 27/Sep/18 ]

Author:

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

Message: SERVER-37320 Prevent prepareTransaction from running on anything but initialized shard servers or config servers, except under failpoint
Branch: master
https://github.com/mongodb/mongo/commit/415795d86be5f4ab40bf2166ee7ef5b37d3d401c

Comment by Andy Schwerin [ 26/Sep/18 ]

esha.maharishi@10gen.com, ok. Just an idea.

Comment by Esha Maharishi (Inactive) [ 26/Sep/18 ]

I guess it wasn't clear from the title the the failpoint will just be around the assertion that the node is an initialized shard server or config server, and the voting bits

Comment by Esha Maharishi (Inactive) [ 26/Sep/18 ]

schwerin, hmm, I don't think that would work... I need to turn off the sharding bits for certain tests, but all tests will have "enable test commands" on.

Comment by Andy Schwerin [ 26/Sep/18 ]

In place of a failpoint, you could also enable prepare when "enable test commands" is set. It has the advantage of always being on in tests, and the disadvantage that it's hard to test that you've turned it off outside of tests. Your call.

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