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

KeyNotFoundException in ConfigChangedHandler in Rb2Out test

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 2.0 Beta
    • 2.0 DP3
    • library
    • None
    • commit 9ce880

    Description

      was found during digging https://www.couchbase.com/issues/browse/NCBC-567?focusedCommentId=96333&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-96333

      so, I've applied workaround to catch AuthenticationException and retry client commands on sdkd side:

      diff --git a/src/SdkdConsole/Daemon/Handle.cs b/src/SdkdConsole/Daemon/Handle.cs
      index c76b291..76ef19c 100644
      — a/src/SdkdConsole/Daemon/Handle.cs
      +++ b/src/SdkdConsole/Daemon/Handle.cs

      @@ -187,7 +188,14 @@ public class Handle : ProtocolIOHandler
      CurrentCommand = cmd;
      }

      • cmd.Run();
        + try^M
        + {^M
        + cmd.Run();^M
        + } catch (System.Security.Authentication.AuthenticationException exc){^M
        + Console.WriteLine("!!!!!!!!!!!!!!!!System.Security.Authentication.AuthenticationException " + SdkHandle.isDisposed());^M
        + cmd.Run();^M
        +^M
        + }^M

      sometimes the test Rb2Out-KV failed with

      [190,51 DEBUG] (RebalanceWaiter sweepOnce:38) Rebalance Progress: 3%
      [191,77 DEBUG] (RebalanceWaiter sweepOnce:38) Rebalance Progress: 4%
      [193,01 DEBUG] (RebalanceWaiter sweepOnce:38) Rebalance Progress: 10%
      [193,85 INFO] (SDKD log:137)
      [193,85 INFO] (SDKD log:137) unhandled exception: System.Collections.Generic.KeyNotFoundException: This key is not in the dictionary.
      [193,86 INFO] (SDKD log:137) in System.Collections.Concurrent.ConcurrentDictionary`2.get_Item(TKey key)
      [193,86 INFO] (SDKD log:137) in Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.ConfigChangedHandler(IBucketConfig bucketConfig) in c:\jenkins\workspace-net2\couchbase-net-client\Src\Couchbase\Configuration\Server\Providers\
      Streaming\HttpStreamingProvider.cs:line 151
      [193,86 INFO] (SDKD log:137) in Couchbase.Configuration.Server.Providers.Streaming.ConfigThreadState.ListenForConfigChanges() in c:\jenkins\workspace-net2\couchbase-net-client\Src\Couchbase\Configuration\Server\Providers\Streaming\ConfigThreadState.
      cs:line 104
      [193,87 INFO] (SDKD log:137) in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
      [193,87 INFO] (SDKD log:137) in System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
      [193,87 INFO] (SDKD log:137) in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
      [193,87 INFO] (SDKD log:137) in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
      [193,87 INFO] (SDKD log:137) in System.Threading.ThreadHelper.ThreadStart()
      [194,26 DEBUG] (RebalanceWaiter sweepOnce:38) Rebalance Progress: 16%
      [195,50 DEBUG] (RebalanceWaiter sweepOnce:38) Rebalance Progress: 17%
      [196,74 DEBUG] (RebalanceWaiter sweepOnce:38) Rebalance Progress: 17%
      [197,98 DEBUG] (RebalanceWaiter sweepOnce:38) Rebalance Progress: 17%
      [199,14 ERROR] (BRun maybePropagate:237) Suppressing driver-related error

      Attachments

        1. log.zip
          7.82 MB
        2. test_logs.txt
          28 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            andreibaranouski Andrei Baranouski
            andreibaranouski Andrei Baranouski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty