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
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.10
    • 2.6.1
    • 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

        For Gerrit Dashboard: NCBC-1695
        # Subject Branch Project Status CR V

        Activity

          There are no comments yet on this issue.

          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