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