-
Notifications
You must be signed in to change notification settings - Fork 58
Add large-payload blob auto-purge (opt-in singleton job, worker/SDK side) #758
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
Open
wangbill (YunchuWang)
wants to merge
28
commits into
main
Choose a base branch
from
yunchuwang-wangbill-blob-payload-autopurge-sdk
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,578
−10
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
306d19f
Add opt-in blob payload auto-purge job to AzureBlobPayloads
YunchuWang 60f6637
Address PR #758 review feedback: naming, self-heal, poison-ack, start…
YunchuWang 149c63a
Refine BlobPurgeJobStarter: pre-check bridge status before rescheduling
YunchuWang 4d52005
Classify RequestFailedException 400 as permanent in DeleteExternalBlo…
YunchuWang 780d743
Reuse shared PayloadStore and register purge starter conditionally on…
YunchuWang 3a2215c
Register fallback PayloadStore in shared Core for both client and worker
YunchuWang 3fbf061
Merge branch 'main' into yunchuwang-wangbill-blob-payload-autopurge-sdk
YunchuWang 47651dc
Stop self-registering PayloadStore on the client; consume the shared …
YunchuWang 7397fa6
Validate PayloadPurgeBatchSize once at specification (fail fast on ou…
YunchuWang 4afeb8a
Translate gRPC Cancelled to OperationCanceledException in GetTombston…
YunchuWang e74f633
Raise auto-purge MaxBatchSize to 1000 (inclusive); relax gRPC GetTomb…
YunchuWang 50ae944
Register PayloadStore in the client builder extension (symmetry with …
YunchuWang a680442
Merge branch 'main' into yunchuwang-wangbill-blob-payload-autopurge-sdk
YunchuWang a5ed298
Resolve v2 tokens in DeleteAsync and discard payloads in unreachable …
YunchuWang fff06b0
Align unreachable-account log, exception wording and v2 delete test n…
YunchuWang 6e4f5d0
Gate blob auto-purge on v2 tokens and deleting stores
YunchuWang 65e9cbb
Fix auto-purge starter registration and client resolution
YunchuWang 8f436df
Back off on zero-ack purge cycles and document TokenPrefixV1
YunchuWang 81284e0
docs(AzureBlobPayloads): reframe v1-token handling as a defensive guard
YunchuWang a15c04d
Merge branch 'main' into yunchuwang-wangbill-blob-payload-autopurge-sdk
berndverst ae5ed1a
Merge branch 'main' into yunchuwang-wangbill-blob-payload-autopurge-sdk
berndverst 1fcdb10
Reshape large-payload auto-purge to the finalized design
YunchuWang 2026d71
Clear three new-code warnings in the auto-purge files
YunchuWang e25e724
Pin the no-inbound-enum invariant the numeric purge casts rely on
YunchuWang 7bf5da8
Clear the two remaining PR-introduced style warnings
YunchuWang de218c8
Narrow the purge reason enum from 11 values to 7
YunchuWang 02b957c
Re-sync purge reason comments from canonical contract
YunchuWang e432d25
Remove purge reason and storage error code from the contract
YunchuWang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace Microsoft.DurableTask.Client; | ||
|
|
||
| /// <summary> | ||
| /// The outcome of a single large-payload blob deletion attempt. The split is by whether a failure can | ||
| /// self-heal. Mirrors the <c>LargePayloadPurgeDisposition</c> protobuf enum. | ||
| /// </summary> | ||
| public enum LargePayloadPurgeDisposition | ||
| { | ||
| /// <summary> | ||
| /// No disposition was specified. | ||
| /// </summary> | ||
| Unspecified = 0, | ||
|
|
||
| /// <summary> | ||
| /// Terminal success. The blob was deleted, was already absent, or was deliberately left in place because | ||
| /// it is not owned by the payload store. The backend deletes the tombstone in all three cases. | ||
| /// </summary> | ||
| Deleted = 1, | ||
|
|
||
| /// <summary> | ||
| /// The failure may self-heal, so the row stays pending and the backend sets the next attempt. | ||
| /// </summary> | ||
| Retry = 2, | ||
|
|
||
| /// <summary> | ||
| /// A deterministic failure or protocol violation that retrying can never fix. The backend preserves the | ||
| /// evidence, alerts, and stops automatic retries. | ||
| /// </summary> | ||
| Quarantined = 3, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace Microsoft.DurableTask.Client; | ||
|
|
||
| /// <summary> | ||
| /// Serializable outcome of exactly one attempted large-payload blob deletion. Mirrors the | ||
| /// <c>LargePayloadPurgeResult</c> protobuf message but is safe to pass through the orchestration/activity | ||
| /// boundary. The backend owns retry scheduling and branches solely on | ||
| /// <see cref="Disposition"/>: it deletes rows reported as | ||
| /// <see cref="LargePayloadPurgeDisposition.Deleted"/>, reschedules | ||
| /// <see cref="LargePayloadPurgeDisposition.Retry"/> on its own backoff, and moves | ||
| /// <see cref="LargePayloadPurgeDisposition.Quarantined"/> rows out of the active fetch. The worker never | ||
| /// computes a retry delay. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// The disposition is deliberately the only outcome field: anything finer would be write-only on the backend. | ||
| /// Why an attempt failed stays in the worker's own telemetry, which holds the cause at full fidelity rather | ||
| /// than as a lossy classification, and a row is correlated to it by | ||
| /// (<see cref="PartitionId"/>, <see cref="InstanceKey"/>, <see cref="PayloadId"/>). | ||
| /// </remarks> | ||
| /// <param name="PartitionId">The backend partition that owns the tombstoned row.</param> | ||
| /// <param name="InstanceKey">The orchestration instance key the payload belonged to.</param> | ||
| /// <param name="PayloadId">The backend identifier of the tombstoned payload row.</param> | ||
| /// <param name="Revision"> | ||
| /// The revision echoed unmodified from the fetched <see cref="LargePayloadTombstone"/>; used by the backend | ||
| /// as a compare-and-swap guard. | ||
| /// </param> | ||
| /// <param name="Disposition">The disposition of the deletion attempt.</param> | ||
| public sealed record LargePayloadPurgeResult( | ||
| int PartitionId, | ||
| long InstanceKey, | ||
| long PayloadId, | ||
| long Revision, | ||
| LargePayloadPurgeDisposition Disposition); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace Microsoft.DurableTask.Client; | ||
|
|
||
| /// <summary> | ||
| /// Serializable representation of a tombstoned large-payload row whose external blob a credentialed caller | ||
| /// must delete. Mirrors the <c>LargePayloadTombstone</c> protobuf message but is safe to pass through the | ||
| /// orchestration/activity boundary. | ||
| /// </summary> | ||
| /// <param name="PartitionId">The backend partition that owns the tombstoned row.</param> | ||
| /// <param name="InstanceKey">The orchestration instance key the payload belonged to.</param> | ||
| /// <param name="PayloadId">The backend identifier of the tombstoned payload row.</param> | ||
| /// <param name="Token"> | ||
| /// The self-describing <c>blob:v2:{fullBlobUrl}</c> payload token whose backing blob should be deleted. | ||
| /// </param> | ||
| /// <param name="Revision"> | ||
| /// An optimistic-concurrency guard echoed back unmodified in the corresponding | ||
| /// <see cref="LargePayloadPurgeResult"/> so the backend can reject duplicate or stale reports without taking | ||
| /// a per-row lease. | ||
| /// </param> | ||
| public sealed record LargePayloadTombstone( | ||
| int PartitionId, long InstanceKey, long PayloadId, string Token, long Revision); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Medium / compatibility] During a mixed rollout, an older backend returns gRPC
Unimplementedfor this new RPC. Only cancellation is translated here, so the activity/orchestrator retries the unsupported operation indefinitely without a clear terminal diagnostic. Please add capability negotiation or mapUnimplementedto an explicit unsupported-backend state that stops/disables the purge job.