private async Task ProcessPartition(PartitionSupervisor partitionSupervisor, DocumentServiceLease lease) { try { await partitionSupervisor.RunAsync(this.shutdownCts.Token).ConfigureAwait(false); } catch (FeedSplitException ex) { await this.HandleSplitAsync(lease, ex.LastContinuation).ConfigureAwait(false); } catch (TaskCanceledException) { Logger.DebugFormat("Lease with token {0}: processing canceled", lease.CurrentLeaseToken); } catch (Exception e) { Logger.WarnException("Lease with token {0}: processing failed", e, lease.CurrentLeaseToken); } await this.RemoveLeaseAsync(lease).ConfigureAwait(false); }
private async Task ProcessPartitionAsync(PartitionSupervisor partitionSupervisor, DocumentServiceLease lease) { try { await partitionSupervisor.RunAsync(this.shutdownCts.Token).ConfigureAwait(false); } catch (FeedSplitException ex) { await this.HandleSplitAsync(lease, ex.LastContinuation).ConfigureAwait(false); } catch (TaskCanceledException) { DefaultTrace.TraceVerbose("Lease with token {0}: processing canceled", lease.CurrentLeaseToken); } catch (Exception e) { Extensions.TraceException(e); DefaultTrace.TraceWarning("Lease with token {0}: processing failed", lease.CurrentLeaseToken); } await this.RemoveLeaseAsync(lease).ConfigureAwait(false); }
private async Task ProcessPartitionAsync(PartitionSupervisor partitionSupervisor, DocumentServiceLease lease) { try { await partitionSupervisor.RunAsync(this.shutdownCts.Token).ConfigureAwait(false); } catch (FeedRangeGoneException ex) { await this.HandlePartitionGoneAsync(lease, ex.LastContinuation).ConfigureAwait(false); } catch (OperationCanceledException) when(this.shutdownCts.IsCancellationRequested) { DefaultTrace.TraceVerbose("Lease with token {0}: processing canceled", lease.CurrentLeaseToken); } catch (Exception ex) { await this.monitor.NotifyErrorAsync(lease.CurrentLeaseToken, ex); DefaultTrace.TraceWarning("Lease with token {0}: processing failed", lease.CurrentLeaseToken); } await this.RemoveLeaseAsync(lease).ConfigureAwait(false); }