It's possible that a timeout waiting for the CidLock may result in incorrectly releasing the CidLock, despite the fact that the lock was not taken by this thread.
I think the infinite loop scenario I fixed in interacted with this problem.
When GetCid failed, triggering the infinite loop (because the failure called RefreshCollectionid, which calls GetCid), then we'd end up in a situation where the GetCid lock would always timeout and never get released. The incorrect Release was hiding the GetCid infinite loop, to an extent.
Fixing the infinite loop means this fix now works as intended.
Jeffry Morris October 11, 2021 at 6:19 PM
This was reverted as it causes a regression with Transactions. Can update the ticket with the details, please?
Fixed
Pinned fields
Click on the next to a field label to start pinning.
It's possible that a timeout waiting for the CidLock may result in incorrectly releasing the CidLock, despite the fact that the lock was not taken by this thread.
https://github.com/couchbase/couchbase-net-client/blob/c8580dbcad2156095fd527afe84fe3634e61fceb/src/Couchbase/KeyValue/CouchbaseCollection.cs#L1050