in src/DurableTask.AzureStorage/Partitioning/TablePartitionManager.cs [745:804]
void LogHelper(
TablePartitionLease partition,
bool claimedLease,
bool stoleLease,
bool renewedLease,
bool drainedLease,
bool releasedLease,
string previousOwner)
{
if (claimedLease)
{
this.settings.Logger.LeaseAcquisitionSucceeded(
this.storageAccountName,
this.settings.TaskHubName,
this.settings.WorkerId,
partitionId: partition.RowKey,
leaseType: NotApplicable);
}
if (stoleLease)
{
this.settings.Logger.LeaseStealingSucceeded(
this.storageAccountName,
this.settings.TaskHubName,
this.settings.WorkerId,
previousOwner,
leaseType: NotApplicable,
partitionId: partition.RowKey);
}
if (releasedLease)
{
this.settings.Logger.LeaseRemoved(
this.storageAccountName,
this.settings.TaskHubName,
this.settings.WorkerId,
partition.RowKey,
token: NotApplicable,
leaseType: NotApplicable);
}
if (drainedLease)
{
this.settings.Logger.PartitionManagerInfo(
this.storageAccountName,
this.settings.TaskHubName,
this.settings.WorkerId,
partitionId: partition.RowKey,
details: "Draining partition");
}
if (renewedLease)
{
this.settings.Logger.LeaseRenewalResult(
this.storageAccountName,
this.settings.TaskHubName,
this.settings.WorkerId,
partitionId: partition.RowKey,
success: true,
token: NotApplicable,
leaseType: NotApplicable,
details: "Successfully renewed partition lease");
}
}