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

[for private package] Fail fast on control queue stuck for over 10 minutes #946

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<!-- The assembly version is only the major/minor pair, making it easier to do in-place upgrades -->
<AssemblyVersion>$(MajorVersion).$(MinorVersion).0.0</AssemblyVersion>
<!-- This version is used as the nuget package version -->
<Version>$(VersionPrefix)</Version>
<Version>$(VersionPrefix)-private-1</Version>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
Expand Down
19 changes: 18 additions & 1 deletion src/DurableTask.AzureStorage/OrchestrationSessionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,30 @@ async Task DequeueLoop(string partitionId, ControlQueue controlQueue, Cancellati
Thread.Sleep(TimeSpan.FromSeconds(1));
}
}

this.settings.Logger.PartitionManagerInfo(
this.storageAccountName,
this.settings.TaskHubName,
this.settings.WorkerId,
partitionId,
$"Stopped listening for messages on queue {controlQueue.Name}.");


_ = Task.Run(async () => {
await Task.Delay(TimeSpan.FromMinutes(10));
if (this.ownedControlQueues.ContainsKey(partitionId))
{
this.settings.Logger.PartitionManagerInfo(
this.storageAccountName,
this.settings.TaskHubName,
this.settings.WorkerId,
partitionId,
$"Unable to release {partitionId} for over 10 minutes. Failing fast in 10 seconds.");

await Task.Delay(TimeSpan.FromSeconds(10));

Environment.FailFast($"Unable to release {partitionId} for over 10 minutes. Failing fast now.");
}
});
}

/// <summary>
Expand Down