[DRIVERS-2412] SDAM should prioritize electionId over setVersion only on >=6.0 servers Created: 11/Aug/22  Updated: 21/Dec/22

Status: Implementing
Project: Drivers
Component/s: SDAM
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Shane Harvey Assignee: Neal Beeken
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by DRIVERS-1954 SDAM should give priority to election... Closed
Issue split
split to RUST-1446 SDAM should prioritize electionId ove... Backlog
split to CXX-2566 SDAM should prioritize electionId ove... Blocked
split to CDRIVER-4455 SDAM should prioritize electionId ove... Closed
split to CSHARP-4298 SDAM should prioritize electionId ove... Closed
split to GODRIVER-2524 SDAM should prioritize electionId ove... Closed
split to JAVA-4707 Prioritize electionId over setVersion... Closed
split to MOTOR-1018 SDAM should prioritize electionId ove... Closed
split to NODE-4546 SDAM should prioritize electionId ove... Closed
split to PHPC-2145 SDAM should prioritize electionId ove... Closed
split to PYTHON-3400 SDAM should prioritize electionId ove... Closed
split to RUBY-3090 SDAM should prioritize electionId ove... Closed
Related
related to DRIVERS-1954 SDAM should give priority to election... Closed
Driver Changes: Needed
Quarter: FY23Q3
Downstream Changes Summary:
  • Sync spec changes in 37c32c
  • Confirm tests fail with current updateRSFromPrimary implementation
  • Summary of updateRSFromPrimary changes:
    • If maxWireVersion 17 or greater
    • Prioritize electionId before setVersion
    • Handle nullish values for both setVersion and electionId
    • always set maxElectionId and maxSetVersion together (they are a tuple value)
  • Confirm tests pass with changes

Join #drivers-2412-sdam-should-prioritize-electionid-over-setversion on slack for any questions

Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4455 Fixed 1.24.0
CXX-2566 Blocked
CSHARP-4298 Done 2.20.0
GODRIVER-2524 Fixed 1.11.0
JAVA-4707 Fixed 4.8.0
NODE-4546 Fixed 4.11.0
MOTOR-1018 Duplicate
PYTHON-3400 Fixed 4.3
PHPC-2145 Done 1.16.0
RUBY-3090 Fixed 2.19.0
RUST-1446 Backlog
SWIFT-1626 Won't Do

 Description   

In DRIVERS-1954, we discovered that the electionId/setVersion change could not be implemented or else drivers would break when replica set restore is run using a pre 6.0 compatible version of Ops Manager.

Instead of waiting until until these old versions of Ops Manager are EOL, I propose we only implement the new electionId/setVersion comparison logic on >=6.0 servers. This will avoid the regression assuming that old Ops Manager versions do not support backup/restore >=6.0 servers.

Using this approach we can fix the original bug in DRIVERS-1954 on >=6.0 servers. Drivers will still be vulnerable to the bug on <6.0 servers but that's okay because we're already in that position now.



 Comments   
Comment by Githook User [ 05/Oct/22 ]

Author:

{'name': 'Neal Beeken', 'email': 'neal.beeken@mongodb.com', 'username': 'nbbeeken'}

Message: DRIVERS-2412: fix updateRSFromPrimary pseudo code indentation (#1312)
Branch: master
https://github.com/mongodb/specifications/commit/9d4b2ac3ae4c64a75c962a55631b31223a938141

Comment by Githook User [ 03/Oct/22 ]

Author:

{'name': 'Neal Beeken', 'email': 'neal.beeken@mongodb.com', 'username': 'nbbeeken'}

Message: DRIVERS-2412: add pre 6.0 condition to stale primary logic (#1309)
Branch: master
https://github.com/mongodb/specifications/commit/37c32cf5200cd8da6652c75ac65279c43628fe7a

Generated at Thu Feb 08 08:25:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.