Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NODE-3712,NODE-4546): electionId should be ordered before setVersion #3174

Merged
merged 7 commits into from
Oct 5, 2022

Conversation

nbbeeken
Copy link
Contributor

@nbbeeken nbbeeken commented Mar 15, 2022

Description

NODE-3712, NODE-4546

What is changing?

  • Sync spec tests, which suffciently unit test the changes
  • Make the logical changes to the updateRsFromPrimary procedure
  • Update the unit test runner, debugability / typescript / modern code
    • Tests passed before and after the changes here

Spec runner changes and partial spec sync done in #3182

Update Oct 2022:

  • Includes the condition to only use the new behavior on wireVersions 17 or greater

What is the motivation for this change?

Correctness, see spec changes: mongodb/specifications#1122
See follow up spec changes unblocking this: mongodb/specifications#1309

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: <type>(NODE-xxxx)<!>: <description>
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@nbbeeken nbbeeken marked this pull request as ready for review March 15, 2022 22:16
src/sdam/topology_description.ts Outdated Show resolved Hide resolved
@dariakp dariakp self-assigned this Mar 22, 2022
@dariakp dariakp added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Mar 22, 2022
@dariakp dariakp self-requested a review March 22, 2022 22:05
@@ -0,0 +1,382 @@
import { Document, EJSON } from 'bson';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as a first request, can we put the runner -> ts conversion in a separate PR (preferrably linked via git mv so that it associates the changed files)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#3182 Done! you have to go in and view the second commit to see the diff as opposed to whole file delete and rewrite. I'll push the removal from here in a bit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving this comment open so we can remember to rebase once the other one is in

src/sdam/topology_description.ts Outdated Show resolved Hide resolved
src/sdam/topology_description.ts Outdated Show resolved Hide resolved
src/sdam/topology_description.ts Outdated Show resolved Hide resolved
@nbbeeken nbbeeken requested a review from dariakp March 28, 2022 17:36
@dariakp dariakp added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Mar 28, 2022
@nbbeeken nbbeeken added Blocked Blocked on other work and removed Team Review Needs review from team labels Mar 29, 2022
@nbbeeken nbbeeken force-pushed the NODE-3712/sdam-electionId-before-setVersion branch from 54faa1f to 2ca9c71 Compare August 12, 2022 15:13
@nbbeeken nbbeeken force-pushed the NODE-3712/sdam-electionId-before-setVersion branch 2 times, most recently from b0377f4 to 85d1813 Compare September 29, 2022 19:15
@nbbeeken nbbeeken added wip and removed Blocked Blocked on other work labels Sep 29, 2022
@nbbeeken nbbeeken force-pushed the NODE-3712/sdam-electionId-before-setVersion branch from 85d1813 to d305339 Compare September 29, 2022 19:49
@nbbeeken nbbeeken changed the title fix(NODE-3712): electionId should be ordered before setVersion fix(NODE-3712,NODE-4546): electionId should be ordered before setVersion Oct 3, 2022
@nbbeeken nbbeeken removed the wip label Oct 3, 2022
@nbbeeken nbbeeken requested a review from durran October 3, 2022 16:50
baileympearson
baileympearson previously approved these changes Oct 4, 2022
Copy link
Contributor

@baileympearson baileympearson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional comment, otherwise LGTM

src/utils.ts Show resolved Hide resolved
@bajanam bajanam added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Oct 4, 2022
@baileympearson baileympearson added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Oct 4, 2022
Copy link
Contributor

@baileympearson baileympearson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI succeeded on restart, just flakey tests.

@baileympearson baileympearson merged commit ca51fec into main Oct 5, 2022
@baileympearson baileympearson deleted the NODE-3712/sdam-electionId-before-setVersion branch October 5, 2022 12:55
ZLY201 pushed a commit to ZLY201/node-mongodb-native that referenced this pull request Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants