microsoft / microsoft/durabletask-java
ContinueAsNew does not support specifying a new orchestration version
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 29
- Fork
- 18
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 2
Mô tả
Summary
The continueAsNew() API does not expose a way to specify a new orchestration version for the restarted instance. The underlying protobuf field (CompleteOrchestrationAction.newVersion, field 4) has existed since the initial proto commit, but the Java SDK never populates it.
Problem
TaskOrchestrationContext.continueAsNew() only accepts (Object input, boolean preserveUnprocessedEvents). There is no parameter to pass a new version. In TaskOrchestrationExecutor, when building the CompleteOrchestrationAction, setNewVersion() is never called — the field is always left empty.
This prevents version migration scenarios for long-running/eternal orchestrations (e.g., monitoring loops that need to evolve their logic over time via continueAsNew with a new version).
What exists today
- Proto layer:
CompleteOrchestrationAction.newVersion(field 4) is defined and supported by all backends (DurableTask.Core since 2014, DTS/Beskar, gRPC sidecar) - Java API:
continueAsNew(Object input)andcontinueAsNew(Object input, boolean preserveUnprocessedEvents)— no version parameter - Java executor:
CompleteOrchestrationAction.Buildernever callssetNewVersion()
Proposed fix
Follow the pattern from the .NET SDK (microsoft/durabletask-dotnet#682):
- Add a
ContinueAsNewOptionsclass withnewInput,preserveUnprocessedEvents, andnewVersionproperties - Add a
continueAsNew(ContinueAsNewOptions options)overload toTaskOrchestrationContext - In
TaskOrchestrationExecutor, whennewVersionis non-null, callbuilder.setNewVersion(StringValue.of(newVersion))on theCompleteOrchestrationAction
Related
- .NET SDK implementation: microsoft/durabletask-dotnet#682
- Azure Functions extension: Azure/azure-functions-durable-extension#3404
- Proto field:
CompleteOrchestrationAction.newVersion(field 4) inorchestrator_service.proto
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách xác định TaskOrchestrationContext và TaskOrchestrationExecutor, sau đó kiểm tra các overload continueAsNew hiện có và việc tạo CompleteOrchestrationAction. Sử dụng issue của .NET SDK được liên kết trong phần mô tả làm tài liệu tham khảo cho dạng options được đề xuất. Công việc được xem là hoàn tất khi các caller Java có thể cung cấp một phiên bản mới và executor điền CompleteOrchestrationAction.newVersion mà vẫn giữ nguyên hành vi hiện tại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- backend-api-design, distributed-systems
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 68/100