From 8b3f6575a90a6b72d107fa5d8bb43de1abf53c6c Mon Sep 17 00:00:00 2001 From: Preston Vasquez <24281431+prestonvasquez@users.noreply.github.com> Date: Thu, 2 Nov 2023 10:50:46 -0600 Subject: [PATCH 1/2] GODRIVER-3038 Add todo comments --- mongo/index_view.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mongo/index_view.go b/mongo/index_view.go index 41a93a2145..835b837772 100644 --- a/mongo/index_view.go +++ b/mongo/index_view.go @@ -86,6 +86,9 @@ func (iv IndexView) List(ctx context.Context, opts ...*options.ListIndexesOption description.LatencySelector(iv.coll.client.localThreshold), }) selector = makeReadPrefSelector(sess, selector, iv.coll.client.localThreshold) + + // TODO(GODRIVER-3038): This operation should pass CSE to the ListIndexes + // Crypt setter to be applied to the operation. op := operation.NewListIndexes(). Session(sess).CommandMonitor(iv.coll.client.monitor). ServerSelector(selector).ClusterClock(iv.coll.client.clock). @@ -251,6 +254,10 @@ func (iv IndexView) CreateMany(ctx context.Context, models []IndexModel, opts .. option := options.MergeCreateIndexesOptions(opts...) + // TODO(GODRIVER-3038): This operation should pass CSE to the ListIndexes + // Crypt setter to be applied to the operation. + // + // This was added in GODRIVER-2413 for the 2.0 major release. op := operation.NewCreateIndexes(indexes). Session(sess).WriteConcern(wc).ClusterClock(iv.coll.client.clock). Database(iv.coll.db.name).Collection(iv.coll.name).CommandMonitor(iv.coll.client.monitor). @@ -387,6 +394,9 @@ func (iv IndexView) drop(ctx context.Context, name string, opts ...*options.Drop selector := makePinnedSelector(sess, iv.coll.writeSelector) dio := options.MergeDropIndexesOptions(opts...) + + // TODO(GODRIVER-3038): This operation should pass CSE to the ListIndexes + // Crypt setter to be applied to the operation. op := operation.NewDropIndexes(name). Session(sess).WriteConcern(wc).CommandMonitor(iv.coll.client.monitor). ServerSelector(selector).ClusterClock(iv.coll.client.clock). From 4869f31f43e0005dc9f3399540f60b43fdd41f8b Mon Sep 17 00:00:00 2001 From: Preston Vasquez <24281431+prestonvasquez@users.noreply.github.com> Date: Thu, 2 Nov 2023 10:53:11 -0600 Subject: [PATCH 2/2] GODRIVER-3038 Make comments operation-specific --- mongo/index_view.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mongo/index_view.go b/mongo/index_view.go index 835b837772..8d3555d0b0 100644 --- a/mongo/index_view.go +++ b/mongo/index_view.go @@ -254,7 +254,7 @@ func (iv IndexView) CreateMany(ctx context.Context, models []IndexModel, opts .. option := options.MergeCreateIndexesOptions(opts...) - // TODO(GODRIVER-3038): This operation should pass CSE to the ListIndexes + // TODO(GODRIVER-3038): This operation should pass CSE to the CreateIndexes // Crypt setter to be applied to the operation. // // This was added in GODRIVER-2413 for the 2.0 major release. @@ -395,7 +395,7 @@ func (iv IndexView) drop(ctx context.Context, name string, opts ...*options.Drop dio := options.MergeDropIndexesOptions(opts...) - // TODO(GODRIVER-3038): This operation should pass CSE to the ListIndexes + // TODO(GODRIVER-3038): This operation should pass CSE to the DropIndexes // Crypt setter to be applied to the operation. op := operation.NewDropIndexes(name). Session(sess).WriteConcern(wc).CommandMonitor(iv.coll.client.monitor).