Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-483

Push down handling of Unacknowledged writes

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.0.9
    • Affects Version/s: 0.0.8
    • Component/s: Command & Dispatch
    • Labels:

      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.

            divjot.arora@mongodb.com Divjot Arora (Inactive)
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            0 Vote for this issue
            2 Start watching this issue