[GODRIVER-2888] Cursor All Function gives context deadline exceeded error in MongoDB Go Driver for varying limits Created: 30/Jun/23  Updated: 06/Sep/23

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

Type: Bug Priority: Unknown
Reporter: Hrishikesh Thakkar Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I have a collection with 763 documents which I fetch 200 at a time using cursor based pagination. 
I am using MongoDB Find Function and then using cursor.All to unmarshall the response into their respective data structures.
The first 3 pages (200*3 = 600) work smoothly however on the last page I see a context deadline exceeded issue. 

incomplete read of message header: context deadline exceeded 

Upon further inspection it's coming from the following line of code

cursorErr := dbCursor.All(childctx, result); 

This happens when the limit is set as 200, however if I change it to 163 (the exact number of documents on the last page) it works perfectly. 

I tried the exact same query on Compass and it works fine. 

 



 Comments   
Comment by PM Bot [ 30/Jun/23 ]

Hi hrishikesh@airstack.xyz, thank you for reporting this issue! The team will look into it and get back to you soon.

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