[GODRIVER-483] Push down handling of Unacknowledged writes Created: 02/Jul/18  Updated: 28/Oct/23  Resolved: 09/Jul/18

Status: Closed
Project: Go Driver
Component/s: Command & Dispatch
Affects Version/s: 0.0.8
Fix Version/s: 0.0.9

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

Issue Links:
Depends
depends on GODRIVER-482 Separate command.Command into command... Closed
Related
is related to GODRIVER-54 OP_MSG support Closed

 Description   

Currently the dispatch package handles unacknowledged writes. With the changes in GODRIVER-482, the dispatch package will no longer need to handle this, as the commands themselves have all the required information. Additionally, implementing OP_MSG means that it is no longer guaranteed that a request will have a response. Since it isn't known whether OP_MSG or OP_QUERY will be used until the command itself is encoded, the command needs to handle not reading a response from an OP_MSG with the moreToCome bit set.

To fix these issues, remove the acknowledged/unacknowledged functionality from the dispatch package's functions and instead alter command.Write's RoundTrip method to determine if an unacknowledged write is being sent and if OP_MSG is used, return ErrUnacknowledgedWrite and if OP_QUERY is used, handle the round trip in a goroutine, including reading the OP_REPLY and throwing it away, and immediately return ErrUnacknowledgedWrite.



 Comments   
Comment by Roland Fong [ 09/Jul/18 ]

https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/416425

Comment by Githook User [ 09/Jul/18 ]

Author:

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

Message: Implement the OP_MSG specification.

GODRIVER-54
GODRIVER-482
GODRIVER-483

Change-Id: Ida787c1005d17f0a8bae5993cbc5e72665e8daae
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/88e57ff579da3574564a9edcccdb6278cc32ce25

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