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

Core entities/various fixes and updates #2619

Merged
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 @@ -215,6 +215,8 @@ internal AzureStorageOrchestrationServiceSettings GetAzureStorageOrchestrationSe
UseLegacyPartitionManagement = this.azureStorageOptions.UseLegacyPartitionManagement,
UseTablePartitionManagement = this.azureStorageOptions.UseTablePartitionManagement,
UseSeparateQueueForEntityWorkItems = this.useSeparateQueueForEntityWorkItems,
EntityMessageReorderWindowInMinutes = this.options.EntityMessageReorderWindowInMinutes,
MaxEntityOperationBatchSize = this.options.MaxEntityOperationBatchSize,
};

if (this.inConsumption)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ private async Task<EntityStateResponse<T>> ReadEntityStateAsync<T>(DurabilityPro
EntityBackendQueries.EntityMetadata? metaData = await entityBackendQueries.GetEntityAsync(
new DTCore.Entities.EntityId(entityId.EntityName, entityId.EntityKey),
includeState: true,
includeDeleted: false,
includeStateless: false,
cancellation: default);

return new EntityStateResponse<T>()
Expand Down Expand Up @@ -642,7 +642,7 @@ async Task<EntityQueryResult> IDurableEntityClient.ListEntitiesAsync(EntityQuery
new EntityBackendQueries.EntityQuery()
{
InstanceIdStartsWith = query.EntityName != null ? $"${query.EntityName}" : null,
IncludeDeleted = query.IncludeDeleted,
IncludeStateless = query.IncludeDeleted,
IncludeState = query.FetchState,
LastModifiedFrom = query.LastOperationFrom == DateTime.MinValue ? null : query.LastOperationFrom,
LastModifiedTo = query.LastOperationTo,
Expand Down
6 changes: 4 additions & 2 deletions src/WebJobs.Extensions.DurableTask/LocalGrpcListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ await this.GetDurabilityProvider(context).SendTaskOrchestrationMessageAsync(
EntityBackendQueries.EntityMetadata? metaData = await entityOrchestrationService.EntityBackendQueries!.GetEntityAsync(
DTCore.Entities.EntityId.FromString(request.InstanceId),
request.IncludeState,
includeDeleted: false,
includeStateless: false,
context.CancellationToken);

return new P.GetEntityResponse()
Expand All @@ -244,7 +244,7 @@ await this.GetDurabilityProvider(context).SendTaskOrchestrationMessageAsync(
InstanceIdStartsWith = query.InstanceIdStartsWith,
LastModifiedFrom = query.LastModifiedFrom?.ToDateTime(),
LastModifiedTo = query.LastModifiedTo?.ToDateTime(),
IncludeDeleted = false,
IncludeStateless = query.IncludeStateless,
IncludeState = query.IncludeState,
ContinuationToken = query.ContinuationToken,
PageSize = query.PageSize,
Expand Down Expand Up @@ -459,6 +459,8 @@ private P.EntityMetadata ConvertEntityMetadata(EntityBackendQueries.EntityMetada
{
InstanceId = metaData.EntityId.ToString(),
LastModifiedTime = metaData.LastModifiedTime.ToTimestamp(),
BacklogQueueSize = metaData.BacklogQueueSize,
LockedBy = metaData.LockedBy,
SerializedState = metaData.SerializedState,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.DurableTask;
using Microsoft.DurableTask.Entities;
using Microsoft.DurableTask.Worker;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -48,6 +49,8 @@ public FunctionsOrchestrationContext(TaskOrchestrationContext innerContext, Func

protected override ILoggerFactory LoggerFactory { get; }

public override TaskOrchestrationEntityFeature Entities => this.innerContext.Entities;

public override T GetInput<T>()
{
this.EnsureLegalAccess();
Expand Down