Skip to content

Commit d3466ee

Browse files
GODRIVER-2649 Add TODOs for passing readConcern correctly for RunCommand. (#1126)
Co-authored-by: Matt Dale <[email protected]>
1 parent a2a01cb commit d3466ee

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

mongo/database.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ func (db *Database) processRunCommand(ctx context.Context, cmd interface{},
173173
default:
174174
op = operation.NewCommand(runCmdDoc)
175175
}
176+
177+
// TODO(GODRIVER-2649): ReadConcern(db.readConcern) will not actually pass the database's
178+
// read concern. Remove this note once readConcern is correctly passed to the operation
179+
// level.
176180
return op.Session(sess).CommandMonitor(db.client.monitor).
177181
ServerSelector(readSelect).ClusterClock(db.client.clock).
178182
Database(db.name).Deployment(db.client.deployment).ReadConcern(db.readConcern).

x/mongo/driver/operation/command.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func (c *Command) Execute(ctx context.Context) error {
7777
return errors.New("the Command operation must have a Deployment set before Execute can be called")
7878
}
7979

80+
// TODO(GODRIVER-2649): Actually pass readConcern to underlying driver.Operation.
8081
return driver.Operation{
8182
CommandFn: func(dst []byte, desc description.SelectedServer) ([]byte, error) {
8283
return append(dst, c.command[4:len(c.command)-1]...), nil

0 commit comments

Comments
 (0)