Skip to content

Commit 25c0e76

Browse files
Rename includeStateless to includeTransient in entity queries (#985)
* rename includeStateless to includeTransient * rename variable also
1 parent 42ab8c1 commit 25c0e76

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/DurableTask.AzureStorage/EntityTrackingStoreQueries.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async ValueTask<List<EntityMetadata>> ConvertResultsAsync(IEnumerable<Orchestrat
107107
entityResult = new List<EntityMetadata>();
108108
foreach (OrchestrationState entry in states)
109109
{
110-
EntityMetadata? entityMetadata = await this.GetEntityMetadataAsync(entry, filter.IncludeStateless, filter.IncludeState);
110+
EntityMetadata? entityMetadata = await this.GetEntityMetadataAsync(entry, filter.IncludeTransient, filter.IncludeState);
111111
if (entityMetadata.HasValue)
112112
{
113113
entityResult.Add(entityMetadata.Value);
@@ -200,7 +200,7 @@ bool OrchestrationIsRunning(OrchestrationStatus? status)
200200
};
201201
}
202202

203-
async ValueTask<EntityMetadata?> GetEntityMetadataAsync(OrchestrationState? state, bool includeStateless, bool includeState)
203+
async ValueTask<EntityMetadata?> GetEntityMetadataAsync(OrchestrationState? state, bool includeTransient, bool includeState)
204204
{
205205
if (state == null)
206206
{
@@ -209,7 +209,7 @@ bool OrchestrationIsRunning(OrchestrationStatus? status)
209209

210210
if (!includeState)
211211
{
212-
if (!includeStateless)
212+
if (!includeTransient)
213213
{
214214
// it is possible that this entity was logically deleted even though its orchestration was not purged yet.
215215
// we can check this efficiently (i.e. without deserializing anything) by looking at just the custom status
@@ -247,7 +247,7 @@ bool OrchestrationIsRunning(OrchestrationStatus? status)
247247
string? serializedEntityState = ClientEntityHelpers.GetEntityState(serializedSchedulerState);
248248

249249
// return the result to the user
250-
if (!includeStateless && serializedEntityState == null)
250+
if (!includeTransient && serializedEntityState == null)
251251
{
252252
return null;
253253
}

src/DurableTask.Core/Entities/EntityBackendQueries.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,15 @@ public struct EntityQuery
112112
public bool IncludeState { get; set; }
113113

114114
/// <summary>
115-
/// Gets a value indicating whether to include metadata about entities that have no user-defined state.
115+
/// Gets a value indicating whether to include metadata about transient entities.
116116
/// </summary>
117-
/// <remarks> Stateless entities occur when the storage provider is tracking metadata about an entity for synchronization purposes
118-
/// even though the entity does not "logically" exist, in the sense that it has no application-defined state.
119-
/// Stateless entities are usually transient. For example, they may be in the process of being created or deleted, or
120-
/// they may have been locked by a critical section.
117+
/// <remarks> Transient entities are entities that do not have an application-defined state, but for which the storage provider is
118+
/// tracking metadata for synchronization purposes.
119+
/// For example, a transient entity may be observed when the entity is in the process of being created or deleted, or
120+
/// when the entity has been locked by a critical section. By default, transient entities are not included in queries since they are
121+
/// considered to "not exist" from the perspective of the user application.
121122
/// </remarks>
122-
public bool IncludeStateless { get; set; }
123+
public bool IncludeTransient { get; set; }
123124

124125
/// <summary>
125126
/// Gets or sets the desired size of each page to return.

0 commit comments

Comments
 (0)