Push down handling of Unacknowledged writes

XMLWordPrintableJSON

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

      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.

              Assignee:
              Divjot Arora (Inactive)
              Reporter:
              Kristofer Brandow (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: