Skip to content

Commit

Permalink
Optimize FindChangeInfosBetweenServerSeqs method
Browse files Browse the repository at this point in the history
  • Loading branch information
kokodak committed Aug 21, 2024
1 parent 3f4f5d3 commit d30abf3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/backend/database/mongo/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,9 @@ func (c *Client) FindChangeInfosBetweenServerSeqs(
from int64,
to int64,
) ([]*database.ChangeInfo, error) {
if from > to {
return nil, nil
}
cursor, err := c.collection(ColChanges).Find(ctx, bson.M{
"project_id": docRefKey.ProjectID,
"doc_id": docRefKey.DocID,
Expand Down

0 comments on commit d30abf3

Please sign in to comment.