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

CidLock may be incorrectly released

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.2.2
    • 3.2.4
    • library
    • None
    • 1

    Description

      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

      Attachments

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

        Activity

          jmorris Jeff Morris added a comment -

          This was reverted as it causes a regression with Transactions. Can Richard Ponton update the ticket with the details, please?

          jmorris Jeff Morris added a comment - This was reverted as it causes a regression with Transactions. Can Richard Ponton update the ticket with the details, please?

          I think the infinite loop scenario I fixed in NCBC-2978 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.

          richard.ponton Richard Ponton added a comment - I think the infinite loop scenario I fixed in NCBC-2978 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.

          People

            richard.ponton Richard Ponton
            btburnett3 Brant Burnett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty