[SERVER-48674] Check if replication is enabled before checking if the node is an arbiter in LogicalSessionCacheImpl Created: 09/Jun/20  Updated: 29/Oct/23  Resolved: 09/Jun/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.0.20, 4.2.8, 4.4.0-rc9, 4.2.9, 4.7.0

Type: Improvement Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-40441 Arbiter nodes log error messages when... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4, v4.2, v4.0
Sprint: Sharding 2020-06-15
Participants:

 Description   

SERVER-40441 made arbiters not try to create session collection or check if it exists. To check if a node is an arbiter, the LogicalSessionCacheImpl calls ReplicationCoordinator::getMemberState. In the case of standalones, this function returns RS_PRIMARY in 4.6 and 4.4 but throws UASSERT_NOT_IMPLEMENTED in 4.2 and earlier. To avoid the error and be consistent, we should call ReplicationCoordinator::isReplEnabled before calling ReplicationCoordinator::getMemberState() in all versions. 



 Comments   
Comment by Githook User [ 10/Jun/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-48674 Check if replication is enabled before checking if the node is an arbiter in LogicalSessionCacheImpl

(cherry picked from commit b0f169be52251fca55b00715c55fa9c4f0220fb3)
Branch: v4.0
https://github.com/mongodb/mongo/commit/bbc3cfff6c40269133cbc636c1d1eb7078e2b5cc

Comment by Githook User [ 10/Jun/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-48674 Check if replication is enabled before checking if the node is an arbiter in LogicalSessionCacheImpl

(cherry picked from commit b0f169be52251fca55b00715c55fa9c4f0220fb3)
Branch: v4.2
https://github.com/mongodb/mongo/commit/4055e8fd42b63e2f87529eeedc506f05ca92b794

Comment by Githook User [ 09/Jun/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-48674 Check if replication is enabled before checking if the node is an arbiter in LogicalSessionCacheImpl

(cherry picked from commit b0f169be52251fca55b00715c55fa9c4f0220fb3)
Branch: v4.4
https://github.com/mongodb/mongo/commit/0620421a92e9fb9d3e638c1a221ed43b49641516

Comment by Githook User [ 09/Jun/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-48674 Check if replication is enabled before checking if the node is an arbiter in LogicalSessionCacheImpl
Branch: master
https://github.com/mongodb/mongo/commit/b0f169be52251fca55b00715c55fa9c4f0220fb3

Generated at Thu Feb 08 05:17:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.