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 getMore with comment specs #1161

Merged
merged 3 commits into from
Mar 27, 2022

Conversation

comandeo
Copy link

https://jira.mongodb.org/browse/DRIVERS-2243 - Fix OperationFailure on MongoDB <4.4.0
https://jira.mongodb.org/browse/DRIVERS-2244 - Test getMore with comment on all topologies

@comandeo comandeo marked this pull request as ready for review March 25, 2022 13:19
@comandeo comandeo requested review from a team as code owners March 25, 2022 13:19
@comandeo comandeo requested review from jmikola and benjirewis and removed request for a team March 25, 2022 13:19
Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

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

LGTM with added comment to the change stream test. As a sanity check I'd also ask that @ShaneHarvey POC these in Python before we merge.

@@ -140,7 +140,50 @@ tests:
- description: "Test that comment is set on getMore"
runOnRequirements:
- minServerVersion: "4.4.0"
topologies: [ single, replicaset ]
Copy link
Member

Choose a reason for hiding this comment

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

I've noted that single was introduced by ad1ee9b; however, this had no effect as the top-level runOnRequirements specified replica sets and sharded clusters only (962fb5f#diff-ba3c94557f77e83f167fb27ed81eb223e4eb3e6178238f3d93def75f37adb301R3).

@@ -140,7 +140,50 @@ tests:
- description: "Test that comment is set on getMore"
runOnRequirements:
- minServerVersion: "4.4.0"
topologies: [ single, replicaset ]
topologies: [ replicaset ]
Copy link
Member

Choose a reason for hiding this comment

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

Should you add a comment explaining why sharded clusters are excluded here (e.g. potentially empty getMore responses)?

If we do want to include sharded clusters, I suppose we could utilize ignoreExtraEvents, which was added in ff0c705 for DRIVERS-1713; however, that would then require drivers to implement those test runner changes just to sync these tests.

The best course of action may be to just leave the comment here and open another DRIVERS ticket to come back to these tests and add ignoreExtraEvents to allow sharded clusters. That wouldn't be something you'd need to work on yourself -- reporting the issue and leaving it in the backlog would be sufficient just so we don't lose track of it.

Copy link
Author

Choose a reason for hiding this comment

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

Good point, thank you. Created a ticked and added corresponding comment to tests.

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.

I also tested these changes in the Node driver, the tests look good (evergreen run)

baileympearson added a commit to mongodb/node-mongodb-native that referenced this pull request Mar 25, 2022
mongodb/specifications#1161 updates the specs to
only send `comment` on getMore commands if the server version is >= 4.4.
Although this functionality was already implemented as a part of this PR,
the spec tests were not.

This commit brings in the spec affected spec tests.
@juliusgeo
Copy link
Contributor

juliusgeo commented Mar 25, 2022

Tested this in the Python driver--evergreen run

@comandeo comandeo merged commit 97c54e2 into mongodb:master Mar 27, 2022
@comandeo comandeo deleted the 2243-fix-getmore-comment branch March 27, 2022 13:46
baileympearson added a commit to mongodb/node-mongodb-native that referenced this pull request Mar 28, 2022
mongodb/specifications#1161 updates the specs to
only send `comment` on getMore commands if the server version is >= 4.4.
Although this functionality was already implemented as a part of this PR,
the spec tests were not.

This commit brings in the spec affected spec tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants