fix(graceful_shutdown): use WithShutdown API in sample - #1133
Open
XiaoFeiASK wants to merge 16 commits into
Open
fix(graceful_shutdown): use WithShutdown API in sample#1133XiaoFeiASK wants to merge 16 commits into
XiaoFeiASK wants to merge 16 commits into
Conversation
Member
|
我们的每一个sample同时也是集成测试 |
Author
Okay, I will try to add integration test |
XiaoFeiASK
force-pushed
the
xiaofei/fix-graceful-shutdown-sample
branch
from
August 13, 2026 00:28
a02a773 to
bfdc959
Compare
Member
|
集成测试的逻辑别加在 intergrate test里面 就加在代码里面 就用if或者select判断符不符合预期 不符合就panic就行了 |
Alanxtl
reviewed
Aug 13, 2026
Member
|
our project use
|
Author
ok,thanks for your review |
AlexStocks
reviewed
Aug 14, 2026
XiaoFeiASK
force-pushed
the
xiaofei/fix-graceful-shutdown-sample
branch
2 times, most recently
from
August 14, 2026 19:49
8c39294 to
47f6da1
Compare
XiaoFeiASK
force-pushed
the
xiaofei/fix-graceful-shutdown-sample
branch
from
August 14, 2026 20:26
aa5da24 to
9fbbaa8
Compare
Author
|
I have fixed CI😀 |
Alanxtl
reviewed
Aug 15, 2026
Alanxtl
reviewed
Aug 15, 2026
Author
|
新增修改:
|
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.
变更说明
更新
graceful_shutdownsample,使其使用当前推荐的dubbo.WithShutdown(...)配置方式。该 PR 主要解决 sample 仍使用旧的
graceful_shutdown.Init(...)初始化方式的问题,并同步更新文档和集成测试说明。问题原因
graceful_shutdownsample 原先通过graceful_shutdown.Init(...)配置优雅停机。当前 Dubbo-go 推荐通过
dubbo.WithShutdown(...)在dubbo.NewInstance(...)中配置 graceful shutdown。如果 sample 继续保留旧写法,用户容易参考到不推荐的 API,也会和当前文档中的新 API 使用方式不一致。修复方案
graceful_shutdown.Init(...)替换为dubbo.WithShutdown(...)dubbo.NewInstance(...)创建 Dubbo 实例WithTimeout、WithStepTimeout、WithNotifyTimeout、WithConsumerUpdateWaitTime和WithOfflineRequestWindowTimeout-notify-timeoutserver 参数,并同步更新 README / README_CNgraceful_shutdownsample 覆盖 Triple 长连接场景下的 graceful shutdown 行为验证
go test ./graceful_shutdown/...git diff --checkFixes #1132