Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2342

Couchbase.IO.SharedConnectionPools.Acquire sometimes throws IndexIndexOutOfRangeException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.7.16
    • 2.7.15
    • library
    • None
    • 1

    Description

       Exception Type: System.IndexOutOfRangeException
      Stack trace:

       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at System.Linq.Enumerable.ElementAtOrDefault[TSource](IEnumerable`1 source, Int32 index)
       at Couchbase.IO.SharedConnectionPool`1.Acquire()
       at Couchbase.IO.Services.PooledIOService.Execute[T](IOperation`1 operation)
       at Couchbase.Core.Server.Send[T](IOperation`1 operation)

       

      Our application encounters this fairly frequently. Up to tens of thousands of times per day. The method of selecting the index of the connection doesn't seem to be working in all cases.

      _connections.ElementAtOrDefault(GetIndex())
      

      A comment in GetIndex() states " we don't care necessarily about thread safety..." , but that approach isn't working so well. Sometimes it gets the wrong index.

      As a workaround we will retry the request.

      Attachments

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

        Activity

          People

            jmorris Jeff Morris
            njohnson@netdocuments.com Nathan Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty