[SERVER-33794] queryOnce should not call obtainMajorityCommittedSnapshot if it's a standalone node Created: 09/Mar/18  Updated: 16/May/18  Resolved: 16/May/18

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

Type: Bug Priority: Major - P3
Reporter: Xiangyu Yao (Inactive) Assignee: Randolph Tan
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-34443 Refactor how WiredTigerRecoveryUnit a... Closed
Operating System: ALL
Sprint: Sharding 2018-04-09, Sharding 2018-06-04
Participants:

 Description   

In SERVER-33609, setReadFromMajorityCommittedSnapshot() was refactored into two functions: setReadConcernLevelAndReplicationMode() and obtainMajorityCommittedSnapshot().

setReadConcernLevelAndReplicationMode() should be called to set the readConcern level in the recovery unit. It should be called at the early stage of an operation.

obtainMajorityCommittedSnapshot() is simply a function that refreshes the majorityCommittedSnapshot. It should only be called when we have "majority" or "snapshot" readConcern and replicationMode being modeReplSet.

However, while running some sharding tests, in rs_local_client's queryOnce function, we could have readConcernLevel being "majority' while replicationMode being none (standalone node). I fixed those tests by manually setting the replicationMode to be replSet so we can call obtainMajorityCommittedSnapshot(). Another potential fix might be ignoring the standalone case? I am not sure what this function really wants here so I am creating this ticket for further fixes.



 Comments   
Comment by Randolph Tan [ 16/May/18 ]

This is no longer needed because of the changes made by SERVER-34443.

Comment by Randolph Tan [ 26/Apr/18 ]

kaloian.manassiev I don't think it's important to fix this issue right way. However, I'm worried about the implications of setting the replication mode of the recovery unit to replSet even though it's not one. I think the code in queryOnce should just change the condition to include that it is a replica set, just like how the read concern handles it.

Comment by Kaloian Manassiev [ 09/Apr/18 ]

renctan, given that we are moving away from allowing standalone sharded components, is there a point in fixing this?

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