From 7a2cd61ca2b7d40bc4116a18aef9af9759e488e0 Mon Sep 17 00:00:00 2001 From: peterstone2017 <12449837+YunchuWang@users.noreply.github.com> Date: Mon, 24 Mar 2025 18:08:29 -0700 Subject: [PATCH 1/3] Partial Purge Support --- src/DurableTask.Core/PurgeResult.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/DurableTask.Core/PurgeResult.cs b/src/DurableTask.Core/PurgeResult.cs index ddde99954..830cbea2d 100644 --- a/src/DurableTask.Core/PurgeResult.cs +++ b/src/DurableTask.Core/PurgeResult.cs @@ -27,9 +27,25 @@ public PurgeResult(int deletedInstanceCount) this.DeletedInstanceCount = deletedInstanceCount; } + /// + /// Initializes a new instance of the class. + /// + /// The number of instances deleted. + /// A value indicating whether the purge operation is complete. + public PurgeResult(int deletedInstanceCount, bool? isComplete) + { + this.DeletedInstanceCount = deletedInstanceCount; + this.IsComplete = isComplete; + } + /// /// Number of instances deleted during this execution of the purge operation. /// public int DeletedInstanceCount { get; } + + /// + /// Gets a value indicating whether the purge operation is complete. + /// + public bool? IsComplete { get; } } } \ No newline at end of file From 0c03278b00f13ac4735d88fc5524f063d7b6d01d Mon Sep 17 00:00:00 2001 From: peterstone2017 <12449837+YunchuWang@users.noreply.github.com> Date: Tue, 25 Mar 2025 09:09:36 -0700 Subject: [PATCH 2/3] update comment --- src/DurableTask.Core/PurgeResult.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/DurableTask.Core/PurgeResult.cs b/src/DurableTask.Core/PurgeResult.cs index 830cbea2d..6a23deb9d 100644 --- a/src/DurableTask.Core/PurgeResult.cs +++ b/src/DurableTask.Core/PurgeResult.cs @@ -31,7 +31,10 @@ public PurgeResult(int deletedInstanceCount) /// Initializes a new instance of the class. /// /// The number of instances deleted. - /// A value indicating whether the purge operation is complete. + /// A value indicating whether the purge operation is complete. + /// If true, the purge operation is complete. All instances were purged. + /// If false, not all instances were purged. Please purge again. + /// If null, default to legacy purge behavior. All instances were purged. public PurgeResult(int deletedInstanceCount, bool? isComplete) { this.DeletedInstanceCount = deletedInstanceCount; From 12dff6f5856105add79c2c6ce5834c26a00bb5df Mon Sep 17 00:00:00 2001 From: wangbill Date: Tue, 25 Mar 2025 15:07:42 -0700 Subject: [PATCH 3/3] Update src/DurableTask.Core/PurgeResult.cs Co-authored-by: Chris Gillum --- src/DurableTask.Core/PurgeResult.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DurableTask.Core/PurgeResult.cs b/src/DurableTask.Core/PurgeResult.cs index 6a23deb9d..dcde66fd8 100644 --- a/src/DurableTask.Core/PurgeResult.cs +++ b/src/DurableTask.Core/PurgeResult.cs @@ -34,7 +34,7 @@ public PurgeResult(int deletedInstanceCount) /// A value indicating whether the purge operation is complete. /// If true, the purge operation is complete. All instances were purged. /// If false, not all instances were purged. Please purge again. - /// If null, default to legacy purge behavior. All instances were purged. + /// If null, whether or not all instances were purged is undefined. public PurgeResult(int deletedInstanceCount, bool? isComplete) { this.DeletedInstanceCount = deletedInstanceCount;