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

Overload of GetAndLockAsync causes stack overflow exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.6.1
    • 2.5.10
    • library
    • None
    • 1

    Description

      {{ public Task<IOperationResult<T>> GetAndLockAsync<T>(string key, TimeSpan expiration, TimeSpan timeout) { return GetAndLockAsync<T>(key, expiration, timeout); }}}

      This is a recursive call > stackoverflow (in .Net Core, it doesn't even crash nicely in unit tests)
      To avoid it you should do something like

      {{ public Task<IOperationResult<T>> GetAndLockAsync<T>(string key, TimeSpan expiration, TimeSpan timeout) { return GetAndLockAsync<T>(key, (uint)expiration.TotalSeconds, timeout); }}}

      https://github.com/couchbase/couchbase-net-client/blob/master/Src/Couchbase/CouchbaseBucket.cs#L1521

      Attachments

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

        Activity

          People

            jmorris Jeff Morris
            jmorris Jeff Morris
            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