fix(submit-chain): 完善异常与取消传播#705
Open
zhibeigg wants to merge 1 commit into
Open
Conversation
确保链任务和重复调度在失败或取消时终止,避免 Future 与协程永久挂起。
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
原有问题
Submit Chain 对协程、平台调度任务和
CompletableFuture的完成状态桥接不完整:典型触发场景与后果
本 PR 修改
CompletableFuture,链执行失败时让 Future 异常完成。suspendCancellableCoroutine完成模型。修改目的
让 Chain 的成功、异常和取消语义保持一致,调用方始终能观察到最终结果,并确保取消后不再有后台任务继续执行。
兼容性与行为变化
验证
./gradlew :module:basic:basic-submit-chain:test --rerun-tasks --no-parallel./gradlew :module:basic:basic-submit-chain:build --rerun-tasks --no-parallelgit diff --checkRefs #703