Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added log when a decrease in partition count has been detected #683

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/DurableTask.AzureStorage/Partitioning/BlobLeaseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ public async Task<IEnumerable<BlobLease>> ListLeasesAsync()

blobLeases.AddRange(downloadTasks.Select(t => t.Result));

if (blobLeases.Count > this.settings.PartitionCount)
{
this.settings.Logger.PartitionManagerError(
this.storageAccountName,
this.taskHubName,
this.workerName,
string.Empty,
$"Partition count for the task hub is set to {this.settings.PartitionCount} while {blobLeases.Count} blobs are detected in storage." +
$"This happens when partition count has been decreased without removing unused storage resources or switching to a new task hub. " +
$"This will result in inefficient partition load balancing.");
}

return blobLeases;
}

Expand Down