[GODRIVER-655] MainDocument isn't always in the first section Created: 26/Nov/18  Updated: 13/Jul/20  Resolved: 13/Jul/20

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

Type: Bug Priority: Minor - P4
Reporter: Craig Wilson Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

https://github.com/mongodb/mongo-go-driver/blob/d685dac01f10a738bb94f874071281022cddc55d/x/network/wiremessage/msg.go#L174

 

The main document isn't always in the first document. For instance, running delete in the shell puts the main document (seemingly) last. I think we just need to loop until you find a type 0 section and use that.



 Comments   
Comment by Jeffrey Yemin [ 13/Jul/20 ]

This was fixed as part of the re-write of the operations layer in 1.1

Comment by Jeffrey Yemin [ 26/Nov/18 ]

Note that this will only be encountered currently when the driver's wire protocol implementation is being used to build a server that consumes wire protocol messages.

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