public override async Task <List <PartitionKeyRange> > GetTargetPartitionKeyRangeByFeedRangeAsync(
            string resourceLink,
            string collectionResourceId,
            PartitionKeyDefinition partitionKeyDefinition,
            FeedRangeInternal feedRangeInternal)
        {
            IRoutingMapProvider routingMapProvider = await this.GetRoutingMapProviderAsync();

            List <Range <string> > ranges = await feedRangeInternal.GetEffectiveRangesAsync(routingMapProvider, collectionResourceId, partitionKeyDefinition);

            return(await this.GetTargetPartitionKeyRangesAsync(
                       resourceLink,
                       collectionResourceId,
                       ranges));
        }
Exemplo n.º 2
0
        public override async Task <List <PartitionKeyRange> > GetTargetPartitionKeyRangeByFeedRangeAsync(
            string resourceLink,
            string collectionResourceId,
            PartitionKeyDefinition partitionKeyDefinition,
            FeedRangeInternal feedRangeInternal,
            bool forceRefresh,
            ITrace trace)
        {
            using (ITrace childTrace = trace.StartChild("Get Overlapping Feed Ranges", TraceComponent.Routing, Tracing.TraceLevel.Info))
            {
                IRoutingMapProvider routingMapProvider = await this.GetRoutingMapProviderAsync();

                List <Range <string> > ranges = await feedRangeInternal.GetEffectiveRangesAsync(routingMapProvider, collectionResourceId, partitionKeyDefinition);

                return(await this.GetTargetPartitionKeyRangesAsync(
                           resourceLink,
                           collectionResourceId,
                           ranges,
                           forceRefresh,
                           childTrace));
            }
        }