Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Feature Request] Utility to detect when deadlock detector triggers

未关闭
#2,461 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
java

调研方向

首先跟踪死锁检测器的路径,以及调用 sleep 或 scheduleActivity 等 workflow API 时现有的 DestroyWorkflowThreadError 行为。定义 workflow 如何在进行这些调用之前观察检测器,并验证该信号是否能让防御性循环在 workflow task 失败后停止。

由索引模型根据 Issue 内容生成。

描述

enhancement
Is your feature request related to a problem? Please describe.

Users would like the ability to programmatically detect when the deadlock detector has triggered (and caused the workflow task to fail), so they can instruct their code to stop processing. This would be used to write defensive logic to prevent zombie threads or loops from running after the workflow task has failed. This typically happens when there’s a bug in user code, such as a spinning loop that runs indefinitely.

Describe the solution you'd like

Currently, the SDK throws a DestroyWorkflowThreadError when a workflow API (e.g., sleep, scheduleActivity) is used after the deadlock detector has been triggered.

It would be great to have a method similar to Thread.currentThread().isInterrupted() that returns true (or an exception). This would allow developers to break out of loops or take alternate actions.

Additional context
主要语言
Java
星标
434
派生
260
平均合并
2 天 21 小时
30 天内合并 PR
19

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

temporalio/sdk-java 的其他 Issue

查看 temporalio/sdk-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。