TestWorkflowMutableStateImpl - race condition between TimerFired event and CancelTimer command
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- java
- 领域
- testing-qa
调研方向
从 temporal-test-server/src/main/java/io/temporal/internal/testservice/TestWorkflowMutableStateImpl.java 中的 processCancelTimer 以及所引用行附近的 TIMER_FIRED 处理开始。使用 issue 中描述的 workflow 场景反复复现该竞态,然后添加一个可靠的回归测试。完成标准是:同一 workflow task 中被 TIMER_FIRED 移除的 timer 不会导致 CancelTimer 以 INVALID_ARGUMENT 失败,也不会阻止 workflow 继续推进。
由索引模型根据 Issue 内容生成。
描述
processCancelTimer throws invalid_argument exception here if timer is null
this timer however would have been already removed if this same workflow task receives a TIMER_FIRED event for this same timer:
I think on cancel command, we should only throw if we check first that if timer is null if it was actually removed in same workflow task.
Issue does not allow workflow in test to complete / make progress.
Full error can look like:
[Workflow Executor taskQueue="flakyservice", namespace="default": 1] WARN io.temporal.internal.worker.WorkflowWorker - Failure while reporting workflow progress to the server. If seen continuously the workflow might be stuck. WorkflowId=flaky, RunId=6d9e3f8a-7a73-4aaf-8cdd-02a3cee750f1, startedEventId=22
io.grpc.StatusRuntimeException: INVALID_ARGUMENT: invalid history builder state for action
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:268)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:249)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:167)
at io.temporal.api.workflowservice.v1.WorkflowServiceGrpc$WorkflowServiceBlockingStub.respondWorkflowTaskCompleted(WorkflowServiceGrpc.java:6079)
at io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.lambda$sendTaskCompleted$0(WorkflowWorker.java:557)
at io.temporal.internal.retryer.GrpcSyncRetryer.retry(GrpcSyncRetryer.java:49)
at io.temporal.internal.retryer.GrpcRetryer.retryWithResult(GrpcRetryer.java:40)
at io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.sendTaskCompleted(WorkflowWorker.java:552)
at io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.handle(WorkflowWorker.java:409)
at io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.handle(WorkflowWorker.java:336)
at io.temporal.internal.worker.PollTaskExecutor.lambda$process$1(PollTaskExecutor.java:76)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Still working on a reliable test for this. @Quinn-With-Two-Ns ping me and can point you to slack there where there is a reproduce that you may need to run a number of times to run into this.
- 主要语言
- Java
- 星标
- 434
- 派生
- 252
- 平均合并
- 3 天 15 分钟
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
temporalio/sdk-java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
temporalio/sdk-java#2676 · 8 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
temporalio/sdk-java#1825 ·
维护者通常 1 天内回复
-
test server
难度 4/5 3-5 天 新手友好度 42/100
temporalio/sdk-java#3088 · 2 条评论 ·
维护者通常 1 天内回复
-
Warn if the SDK tried to send a payload above a specific size - Java可能已有人在做 @jmaeagle99 于 19 天前认领。 未关闭
temporalio/sdk-java#3059 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Allow configurable prefix for MDC keys可能已有人在做 @maciejdudko 于 19 天前认领。 未关闭enhancement
temporalio/sdk-java#3058 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 temporalio/sdk-java 的全部 Issue
相似的 Issue
-
link-check link-check:manual
难度 2/5 1-3 小时 新手友好度 85/100
-
难度 1/5 1 小时以内 新手友好度 91/100
open-telemetry/opentelemetry-java#8870 ·
维护者通常 1 天内回复
-
P2 testing
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
enhancement javascript
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area/core kind/bug status/triage team/core-shared
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复