Skip to content

Remove unknown fields in isMaster cmd #755

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

Merged
merged 6 commits into from
Mar 16, 2021
Merged

Conversation

bazile-clyde
Copy link
Contributor

@bazile-clyde bazile-clyde commented Mar 15, 2021

This commit fixes the failing /Async/ismaster tests in evergreen.

Because of SERVER-53150, the latest server versions fail on isMaster commands with unknown fields. Previously this test inflatted the isMaster to >1MB to address the issue in CDRIVER-2483 by adding random-ish fields. Rather than sending an unknown field, this fix adds a >1MB comment.

@@ -235,6 +235,7 @@ test_large_ismaster_helper (mongoc_async_cmd_t *acmd,
}
ASSERT_CMPINT (result, ==, MONGOC_ASYNC_CMD_SUCCESS);

ASSERT_HAS_FIELD(bson, "ismaster");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Leaving this here since previously we didn't print the BSON object if the line below failed.

Comment on lines +2084 to +2095
_test_request_scan_on_error (
1,
"{'ok': 1, 'writeConcernError': { 'errmsg': 'not master' }}",
1,
1,
"not master");
_test_request_scan_on_error (
0,
"{'ok': 1, 'writeConcernError': { 'errmsg': 'not master' }}",
1,
1,
"not master");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

clang-format

@bazile-clyde bazile-clyde requested a review from alcaeus March 15, 2021 16:26
Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

LGTM!

@bazile-clyde bazile-clyde merged commit 26321ea into mongodb:master Mar 16, 2021
@bazile-clyde bazile-clyde deleted the fix branch March 16, 2021 14:42
chardan pushed a commit to chardan/mongo-c-driver that referenced this pull request Aug 26, 2021
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.

2 participants