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

Default CancellationTokens start at option creation instead of when requests are sent

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None
    • None
    • 2
    • SDK50, SDK52, SDK10: FIT, PthFndng, 3.5 Rel, SDK12: Scp Fnc, FIT, Misc, SDK14: CLoE + Others, SDK16: Clmnr Proto & C++, SDK18

    Description

      In the Management APIs, when neither a Timeout or CancellationToken is set, a default token is created using the ClusterOptions.ManagementTimeout.
      This starts the timer when the options are created instead of when the request is sent.

      Additionally, the management APIs sending their own Http requests (All except QueryIndex) don't use the options' timeout or the default Management Timeout.
      Ideally, they would use the global ClusterOptions Timeout, however it's been decided that for now the Timeout will default to the base 75s only.

      Changes required
      ------------------
      1. Issue a CancellationToken based on the options when requests are sent
      2. Change APIs' options to remove the newly issued CTS + Token. Set the backing field of the Timeout() method to a TimeSpan.
      3. Create new Cts from Timeout and issue a token when the CancellationToken is None

      Attachments

        Issue Links

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

          Activity

            People

              emilien.bevierre Emilien Bevierre
              emilien.bevierre Emilien Bevierre
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  PagerDuty