[GODRIVER-1937] BatchSize does not work for legacy collection enumeration Created: 30/Mar/21  Updated: 28/Oct/23  Resolved: 05/May/21

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.5.2

Type: Bug Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Matt Dale
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

This commit added a BatchSize option for Database#ListCollections but the legacy listCollections code path for server version 2.6 does not honor it (see here). We should fix that by using the cursor.batchSize command field to set the NumberToReturn field in the constructed OP_QUERY message similar to the legacy listIndexes logic.

Additionally, GODRIVER-1934 is adding a test for getMore/killCursors commands to mongo/integration/database_test.go. Due to this bug, the test has to be skipped on 2.6, so the work for this ticket should also unskip it.



 Comments   
Comment by Githook User [ 05/May/21 ]

Author:

{'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}

Message: GODRIVER-1937 Update legacy ListCollections to support the BatchSize option for server version 2.6 (#656)
Branch: release/1.5
https://github.com/mongodb/mongo-go-driver/commit/2894cc48ae1b660f69a29fb57ab2088a35a87701

Comment by Githook User [ 04/May/21 ]

Author:

{'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}

Message: GODRIVER-1937 Update legacy ListCollections to support the BatchSize option for server version 2.6 (#656)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/899e5cd8638d46c9b85b90b1c5868221cb08f1aa

Comment by Matt Dale [ 29/Apr/21 ]

PR: https://github.com/mongodb/mongo-go-driver/pull/656

Generated at Thu Feb 08 08:37:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.