Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-1705

Release 'view op' on results close

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • SyncGateway
    • Security Level: Public
    • None
    • CBG Sprint 83
    • 5

    Description

      GoCB Query changes are as follows:
      GoCBv1 - Query is made when we execute the query, all the results are pulled down and stored in memory and a results iterator is returned so we can work with the results. The query connection is closed as soon as we have all the results in memory.
      GoCBv2 - Query is established when we execute the query but rather than storing all results in memory the data is streamed over as we iterate over the results. The connection is only closed when we call Close() on the results.

      Currently we have implemented a throttle to limit the number of concurrent view ops / query ops by applying the limit to the Query function(s). However, due to the above changes in V2 this is not adequate as it is only limiting that initial establish. We should instead cover the full window from opening the connection to closing the connection.

      Therefore proposed change:

      Rather than running releaseViewOp() as part of the Query operation this should be called in the Close() function. This should just mean that we can store the operation (whether in channel form or some sort of function) on gocbRawIterator so we can call that as part of Close().

      Should ensure that we still release that view op in the event of some sort of query error too. ie - ensuring in an error we still call Close() and don't just quit out.

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jacques.rascagneres Jacques Rascagneres
              jacques.rascagneres Jacques Rascagneres
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty