Skip to content
New issue

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

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

Already on GitHub? # to your account

Complete pending CSOT reads in foreground #1873

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

prestonvasquez
Copy link
Member

Summary

Background & Motivation

@prestonvasquez prestonvasquez marked this pull request as draft October 18, 2024 19:39
@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the priority-3-low Low Priority PR for Review label Oct 18, 2024
Copy link
Contributor

mongodb-drivers-pr-bot bot commented Oct 18, 2024

API Change Report

./v2/event

compatible changes

ConnectionPendingReadDuration: added
ConnectionPendingReadFailed: added
ConnectionPendingReadStarted: added
ConnectionPendingReadSucceeded: added
PoolEvent.RemainingTime: added
PoolEvent.RequestID: added

./v2/x/mongo/driver/drivertest

incompatible changes

##(*ChannelConn).Read: changed from func(context.Context) ([]byte, error) to func(context.Context, ..../v2/x/mongo/driver/mnet.ReadOption) ([]byte, error)

./v2/x/mongo/driver/mnet

incompatible changes

NewConnection: changed from func(interface{ReadWriteCloser; Describer}) *Connection to func(interface{ReadWriteCloser; Describer}) *Connection
ReadWriteCloser.Read: changed from func(context.Context) ([]byte, error) to func(context.Context, ...ReadOption) ([]byte, error)

compatible changes

ReadOption: added
ReadOptions: added
WithReadMaxTimeMS: added
WithRequestID: added

./v2/x/mongo/driver/session

incompatible changes

##./v2/x/mongo/driver/mnet.ReadWriteCloser.Read: changed from func(context.Context) ([]byte, error) to func(context.Context, ..../v2/x/mongo/driver/mnet.ReadOption) ([]byte, error)

./v2/x/mongo/driver/topology

incompatible changes

##(*Connection).Read: changed from func(context.Context) ([]byte, error) to func(context.Context, ..../v2/x/mongo/driver/mnet.ReadOption) ([]byte, error)
BGReadCallback: removed
BGReadTimeout: removed

compatible changes

PendingReadTimeout: added

res, err = roundTrip(ctx, conn, *wm)

readOpts := []mnet.ReadOption{}
if maxTimeMS != 0 {
Copy link
Member Author

Choose a reason for hiding this comment

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

What about the case where a user provides maxTimeMs in the command function, such as tailable awaitData cursors? In that case we omit maxTimeMS, but we should still rely on the pending read behavior.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
priority-3-low Low Priority PR for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant