-
Notifications
You must be signed in to change notification settings - Fork 543
CXX-1848 Add sharded cluster test coverage to EVG config #1007
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
Conversation
…, CXX-2235, CXX-2393, CXX-2552, CXX-2690)
… and readConcern=local
Latest changes verified by this patch. Merged of upstream branch included redefining sharded cluster tasks to match the new |
Latest changes verified by this patch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test runner improvements (e.g. capture of APM events on result failure, use of failpoint scope guards) are much appreciated. LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Description
This PR primarily resolves CXX-1848. Verified by this patch.
This PR syncs both the legacy and unified transactions spec test files, and adds mongos pinning prose tests.
The syncing of spec test files also resolves, or contributes to the partial resolution of, CXX-1547, CXX-2406, CXX-1976, CXX-2221, CXX-2233, CXX-2235, CXX-2393, CXX-2552, and CXX-2690.
Sharded Cluster Behavior Discrepancies
Raw Response Document
There is only one notable change to the behavior of the CXX Driver, which is a bugfix that addresses a discrepancy in behavior of a sharded cluster compared to a single server or replica set when creating index views, as documented in SERVER-78611.
The
index_view::create_*()
functions return an optional that is empty if the index(es) to be created already exist (note: this is not consistent with the current Drivers spec, which does not return an optional). This does not behave as intended with sharded clusters due to the response fields being wrapped in a "raw" response document instead of being top-level fields.This PR fixes the check such that the optional is empty as intended if the index views to be created already exist (consistency with single servers and replica sets).
$listLocalSessions and Non-Existent Databases
Sharded clusters appear to behave differently to single servers and replica sets when running
$listLocalSessions
on a database that does not yet exist, as documented in SERVER-79306. The only change required to account for this discrepancy was updating the aggregation example code to ensure teh database exists prior to running aggregation commands. This may affect more aggregation operations, but they were not exposed in testing.Legacy Test Runner Changes
The addition of sharded cluster test coverage exposed a multitude of issues with the legacy test runner . These issues include:
"sharded-replicaset"
topology (followup to CXX-2690 Deprecate sharded-replicaset topology type #975).maxAwaitTimeMS
.configureFailPoint
APM events.readPreference=primary
+readConcern=local
The only test cases that are skipped is due to CXX-2678 not yet being implemented, which prevents the legacy test runner from being able to specify the
readPreference
for arunCommand
operation.Note: testing ran into the same issue as CDRIVER-4351. Identified the cause to be the preceeding
commitTransaction retry fails on new mongos
test inmongos-recovery-token.json
failing to properly disable the targetedFailPoint due to failing to trigger theisMaster
/hello
failPoint as intended (retries were not actually sending a command to the server). Creating a new client object on each attempt resolved the flaky failures. This solution may also be required in the C Driver to address CDRIVER-4351.Unified Test Runner Changes
Issues that were fixed include:
readPreference=primary
+readConcern=local
.