Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-1169

Panic after results exhaust on NextBytes() call

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • core-10.0.3
    • None
    • core-library
    • None
    • 1

    Description

      We have a use case with query results where we may end up calling NextBytes() on a query result after we've already exhausted all of the results. 
      Our use case means we have multiple places where we call NextBytes() and sometimes we end up exhausting the results, sometimes we don't. To avoid Closing the query results before results have exhausted (which results in the result must be closed before accessing the meta-data ) we want to clear out the results as part of a Close() wrapper. 
      Our Close() is attempting to just do a no-op iteration to clear the results but as mentioned earlier fi the results are already exhausted the NextBytes() op panics. Looks like the row streamer is nilled if the last NextBytes() returned nil which is the cause of the panic.

      Would it be possible to add an additional check on this to continue to return nil on NextBytes() to avoid this panic.

      Attachments

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

        Activity

          People

            charles.dixon Charles Dixon
            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