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
For Gerrit Dashboard: NCBC-2342 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
121691,2 | Revert "NCBC-2148: Initialize connection pool connections in parallel" | release27 | couchbase-net-client | Status: MERGED | +2 | +1 |