Skip to content

Commit ab2c4e0

Browse files
committed
Use non blocking sort hint.
1 parent 75238d0 commit ab2c4e0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

data/store/mongo/mongo_datum.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,8 +767,7 @@ func (d *DatumRepository) populateLastUpload(ctx context.Context, userId string,
767767

768768
findOptions := options.Find().SetProjection(bson.M{"_id": 0, "modifiedTime": 1, "createdTime": 1})
769769
if lowerTimeBound, err := time.Parse(time.RFC3339, LowerTimeIndexRaw); err == nil && timeMin.After(lowerTimeBound) {
770-
// has blocking sort, but more selective so usually performs better.
771-
findOptions.SetHint("UserIdActiveTypeTimeModifiedTime")
770+
findOptions.SetHint("TestUserIdActiveTypeModifiedTimeTime")
772771
}
773772
findOptions.SetLimit(1)
774773
findOptions.SetSort(bson.D{{Key: "modifiedTime", Value: -1}})

0 commit comments

Comments
 (0)