Skip to content

Commit

Permalink
with limit
Browse files Browse the repository at this point in the history
  • Loading branch information
jh-bate committed Dec 21, 2023
1 parent 47d16a7 commit a6fb33c
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ func (m *Migration) fetchAndUpdateBatch() bool {
dataSet := []bson.M{}
dDataCursor, err := dataC.Find(m.ctx, selector,
&options.FindOptions{
Limit: &m.config.readBatchSize,
Sort: bson.M{"_id": 1},
BatchSize: &size,
},
Expand Down

0 comments on commit a6fb33c

Please # to comment.