internal override async Task BootstrapAsync(IClusterNode node) { try { await node.SelectBucketAsync(this).ConfigureAwait(false); if (Context.SupportsCollections) { Manifest = await node.GetManifest().ConfigureAwait(false); } BucketConfig = await node.GetClusterMap().ConfigureAwait(false); if (Context.ClusterOptions.HasNetworkResolution) { //Network resolution determined at the GCCCP level BucketConfig.NetworkResolution = Context.ClusterOptions.EffectiveNetworkResolution; } else { //A non-GCCCP cluster BucketConfig.SetEffectiveNetworkResolution(node.BootstrapEndpoint, Context.ClusterOptions); } KeyMapper = await _vBucketKeyMapperFactory.CreateAsync(BucketConfig).ConfigureAwait(false); Nodes.Add(node); await Context.ProcessClusterMapAsync(this, BucketConfig).ConfigureAwait(false); ClearErrors(); } catch (Exception e) { if (e is CouchbaseException ce) { if (ce.Context is KeyValueErrorContext { Status : ResponseStatus.NotSupported })
internal override async Task BootstrapAsync(IClusterNode node) { try { //the initial bootstrapping endpoint; await node.SelectBucketAsync(this).ConfigureAwait(false); //fetch the cluster map to avoid race condition with streaming http BucketConfig = await _httpClusterMap.GetClusterMapAsync( Name, node.BootstrapEndpoint, CancellationToken.None).ConfigureAwait(false); if (Context.ClusterOptions.HasNetworkResolution) { //Network resolution determined at the GCCCP level BucketConfig.NetworkResolution = Context.ClusterOptions.EffectiveNetworkResolution; } else { //A non-GCCCP cluster BucketConfig.SetEffectiveNetworkResolution(node.BootstrapEndpoint, Context.ClusterOptions); } KeyMapper = await _ketamaKeyMapperFactory.CreateAsync(BucketConfig).ConfigureAwait(false); node.Owner = this; await Context.ProcessClusterMapAsync(this, BucketConfig).ConfigureAwait(false); } catch (CouchbaseException e) { Logger.LogDebug(LoggingEvents.BootstrapEvent, e, ""); throw; } //If we cannot bootstrap initially will loop and retry again. Bootstrapper.Start(this); }