[GODRIVER-1535] endSessions batching must reset BSON array index Created: 17/Mar/20  Updated: 28/Oct/23  Resolved: 26/Mar/20

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

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


 Description   

When we batch sessions for the endSessions command, the BSON array we generate after the first batch does not have indexes starting from 0. This causes a server error. Per the spec, we ignore errors for endSessions and I don't think we have tests that cause more than 10000 sessions to be pooled so this is missing test coverage.

 

Writing a test in mongo/integration would be expensive because we'd need to create 10k sessions, but we can write a test in mongo to manually reduce the batch size and use command monitoring to make assertions.



 Comments   
Comment by Githook User [ 26/Mar/20 ]

Author:

{'email': 'divjot.arora@10gen.com', 'name': 'Divjot Arora', 'username': 'divjotarora'}

Message: GODRIVER-1535 Fix session IDs batching in Disconnect
Branch: release/1.3
https://github.com/mongodb/mongo-go-driver/commit/ed18ae678956ae38a79fa8fbeae87db2ab093c8c

Comment by Githook User [ 26/Mar/20 ]

Author:

{'email': 'divjot.arora@10gen.com', 'name': 'Divjot Arora', 'username': 'divjotarora'}

Message: GODRIVER-1535 Fix session IDs batching in Disconnect (#343)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/218a07ce375813a76769742da846830138dca9c0

Comment by Divjot Arora (Inactive) [ 23/Mar/20 ]

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

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