mirror of
https://github.com/deepseek-ai/3FS.git
synced 2026-11-05 00:47:47 +00:00
[GH-ISSUE #412] ChainTable的version有可能回退 #236
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/3FS#236
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Captain32 on GitHub (May 4, 2026).
Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/412
问题描述
看代码的时候发现,admin_cli处理
upload-chain-table命令的时候,会向Mgmtd Server发起setChainTable这个RPC调用,但是Mgmtd Server处理的时候,没有考虑只改变了desc的情况:复现Case
在
tests/mgmtd/TestMgmtdOperator.cc中加了一个测试样例,其中Step 3就是只修改了desc:运行测试可以发现,
Step 3过后,ChainTable的version回退到了1,其实相当于把原本的version 1覆盖了:修复方案
其实
ChainTable到这一步能发生修改的就chains或desc,令desc发生修改的时候也推进version就行。并且感觉不应该用newChainTable == current判断是否发生修改,因为newChainTable的version默认为1,和current很可能不一样,只需要关注chains和desc就行:修复后可以通过
test_mgmtd内所有测试样例,外加新增的这个:@SF-Zhou commented on GitHub (May 4, 2026):
LGTM. @KuribohG take a look?