DanielLavrushin 说明 b4 先保存配置再应用的修复与合并
在 b4 配置保存顺序修复的讨论中,DanielLavrushin 赞同先保存配置而非回滚工作池的处理。他表示,已将相同的先保存顺序用于 main.go 中 Watchdog 的提交并增加测试;Pool.UpdateConfig 原本不会失败,因此移除了其错误返回及无法执行的错误分支,包括 restoreConfigFile。他还移除了超出此次修复范围的 nfq 进程级状态测试,并补充贡献者署名。他确认改动已以 7db36e6 合并,当时表示会随下一次发行提供。
作者原文@DanielLavrushinThanks a lot, @vsolano9! The reproduction test and the reasoning for saving first instead of rolling the pool back were spot on.
I added a few things on top before merging, so you did not have to:
- the same save-first order for the watchdog's commit in
main.go, with its own test;Pool.UpdateConfigwithout its error return, since it could never fail, which removes the dead error branches,restoreConfigFileincluded;- the contributor credit in both changelogs.
I also dropped the
nfqtests of the pool's process-wide state, since they covered behaviour outside this fix. Merged as 7db36e6, it ships in the next release.