XiaoFeiASK opened a new pull request, #1133:
URL: https://github.com/apache/dubbo-go-samples/pull/1133

   ## 变更说明
   
   更新 `graceful_shutdown` sample,使其使用当前推荐的 `dubbo.WithShutdown(...)` 配置方式。
   
   该 PR 主要解决 sample 仍使用旧的 `graceful_shutdown.Init(...)` 初始化方式的问题,并同步更新文档和集成测试说明。
   
   ## 问题原因
   
   `graceful_shutdown` sample 原先通过 `graceful_shutdown.Init(...)` 配置优雅停机。
   
   当前 Dubbo-go 推荐通过 `dubbo.WithShutdown(...)` 在 `dubbo.NewInstance(...)` 中配置 
graceful shutdown。如果 sample 继续保留旧写法,用户容易参考到不推荐的 API,也会和当前文档中的新 API 使用方式不一致。
   
   ## 修复方案
   
   - 将 `graceful_shutdown.Init(...)` 替换为 `dubbo.WithShutdown(...)`
   - 使用 `dubbo.NewInstance(...)` 创建 Dubbo 实例
   - 通过实例创建 Server,确保 graceful shutdown 配置从 Instance 传递到 Server
   - 补充常用 graceful shutdown 配置项,包括 
`WithTimeout`、`WithStepTimeout`、`WithNotifyTimeout`、`WithConsumerUpdateWaitTime`
 和 `WithOfflineRequestWindowTimeout`
   - 新增 `-notify-timeout` server 参数,并同步更新 README / README_CN
   - 更新集成测试流程,使 `graceful_shutdown` sample 覆盖 Triple 长连接场景下的 graceful shutdown 
行为
   
   ## 验证
   
   - `go test ./graceful_shutdown/...`
   - `git diff --check`
   
   Fixes #1132


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to