Ejemplo n.º 1
0
        async Task IBucketInternal.Bootstrap(ClusterNode bootstrapNode)
        {
            //should never happen
            if (bootstrapNode == null)
            {
                throw new ArgumentNullException(nameof(bootstrapNode));
            }

            bootstrapNode.Owner = this;

            //reuse the bootstrapNode
            _bucketNodes.AddOrUpdate(bootstrapNode.EndPoint, bootstrapNode, (key, node) => bootstrapNode);
            bootstrapNode.Configuration = _configuration;

            //the initial bootstrapping endpoint;
            await bootstrapNode.SelectBucket(Name).ConfigureAwait(false);

            _manifest = await bootstrapNode.GetManifest().ConfigureAwait(false);

            _supportsCollections = bootstrapNode.Supports(ServerFeatures.Collections);

            var bucketConfig = await bootstrapNode.GetClusterMap().ConfigureAwait(false); //TODO this should go through standard config check process NCBC-1944

            //first call should be synchronous
            ConfigUpdated(this, new BucketConfigEventArgs(bucketConfig));
        }