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

Push down handling of Unacknowledged writes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 0.0.8
    • 0.0.9
    • Command & Dispatch
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: