-
Notifications
You must be signed in to change notification settings - Fork 901
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
(POC V2) GODRIVER-3173 Complete pending reads on conn checkout #1977
base: master
Are you sure you want to change the base?
Conversation
API Change Report./v2/eventcompatible changesConnectionPendingReadFailed: added ./v2/x/mongo/driver/topologyincompatible changesBGReadCallback: removed compatible changesPendingReadTimeout: added |
aa4debe
to
a805a43
Compare
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.
Pull Request Overview
This pull request implements changes to support completing pending reads on connection checkout. Key changes include:
- Adding new YAML tests for client‐side operation timeouts related to pending reads.
- Updating connection and pool logic to handle pending reads with context values (e.g. maxTimeMS and requestID) and synchronizing background reads.
- Introducing new monitoring events and updating event verification and test instrumentation to track pending read events.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
testdata/client-side-operations-timeout/pending-reads.yml | New YAML tests for handling operation timeouts and pending read scenarios. |
internal/integration/client_test.go | Updated concurrent operation tests to account for pending reads. |
internal/driverutil/context.go | Added context helper functions for maxTimeMS and requestID propagation. |
x/mongo/driver/topology/pool.go | Updated pool checkout logic to await completion of pending reads and renamed timeout constants. |
x/mongo/driver/topology/pool_test.go | Revised pool tests to verify new pending read behaviors. |
internal/integration/unified/event_verification.go | Added fields and tests for verifying new pending read pool events. |
event/monitoring.go | Extended pool event monitoring with pending read event support. |
x/mongo/driver/operation.go | Propagated context values in operation execution for pending read handling. |
internal/integration/csot_test.go | Updated CSOT tests to ensure connection closure conditions with pending reads. |
Comments suppressed due to low confidence (2)
internal/integration/unified/event_verification.go:61
- Field name 'ConnectionPendingreadSucceeded' should be 'ConnectionPendingReadSucceeded' to maintain consistent capitalization with the other pending read event fields.
ConnectionPendingreadSucceeded *struct{} `bson:"connectionPendingReadSucceeded"`
x/mongo/driver/topology/pool.go:908
- Typo in comment: 'alawys' should be corrected to 'always'. Consider removing or clarifying this inline question to avoid confusion.
if size == 0 { // Question: Would this alawys equal to zero?
Summary
Background & Motivation