[GH-ISSUE #246] 对于读存在提交版本和缓存版本的疑问 #153

Open
opened 2026-10-26 09:46:01 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @shuiyihang on GitHub (Apr 18, 2025).
Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/246

你好,我看设计笔记里提到: When there are both committed and pending versions, the service replies a special status code to notify the client.
和这部分代码
Result<Void> StorageTarget::aioPrepareRead(AioReadJob &job) { readCountPerDisk_->addSample(1); readBytesPerDisk_->addSample(job.alignedLength()); if (useChunkEngine()) { return ChunkEngine::aioPrepareRead(*engine_, job); } else { return ChunkReplica::aioPrepareRead(chunkStore_, job); } }
但是我发现使用脚本生成的创建目标的txt文件中内容是:
create-target --node-id 10002 --disk-index 0 --target-id 1001000200102 --chain-id 1000100003 --use-new-chunk-engine
也就是说targetConfig.only_chunk_engine被设置为true,并序列化保存成一个toml文件,以后都会加载only_chunk_engine为true.
但是我在ChunkEngine::aioPrepareRead中并没有看到类似如下版本号对比的处理:
if (UNLIKELY(result.commitVer != result.updateVer && !state.readUncommitted)) { auto msg = fmt::format("chunk {} {} version mismatch {} != {}", chunkId, meta, result.commitVer, result.updateVer); XLOG(ERR, msg); storageReadUncommitted.addSample(1); return makeError(StorageCode::kChunkNotCommit, std::move(msg)); }
请问是我看的逻辑有遗漏吗

Originally created by @shuiyihang on GitHub (Apr 18, 2025). Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/246 你好,我看设计笔记里提到: When there are both committed and pending versions, the service replies a special status code to notify the client. 和这部分代码 `Result<Void> StorageTarget::aioPrepareRead(AioReadJob &job) { readCountPerDisk_->addSample(1); readBytesPerDisk_->addSample(job.alignedLength()); if (useChunkEngine()) { return ChunkEngine::aioPrepareRead(*engine_, job); } else { return ChunkReplica::aioPrepareRead(chunkStore_, job); } }` 但是我发现使用脚本生成的创建目标的txt文件中内容是: create-target --node-id 10002 --disk-index 0 --target-id 1001000200102 --chain-id 1000100003 --use-new-chunk-engine 也就是说targetConfig.only_chunk_engine被设置为true,并序列化保存成一个toml文件,以后都会加载only_chunk_engine为true. 但是我在ChunkEngine::aioPrepareRead中并没有看到类似如下版本号对比的处理: `if (UNLIKELY(result.commitVer != result.updateVer && !state.readUncommitted)) { auto msg = fmt::format("chunk {} {} version mismatch {} != {}", chunkId, meta, result.commitVer, result.updateVer); XLOG(ERR, msg); storageReadUncommitted.addSample(1); return makeError(StorageCode::kChunkNotCommit, std::move(msg)); }` 请问是我看的逻辑有遗漏吗
Author
Owner

@mychaow commented on GitHub (Jul 2, 2025):

c++版本的有这种逻辑,rust版本我也没看到这个逻辑,目前看rust版本就是读已提交

<!-- gh-comment-id:3026062812 --> @mychaow commented on GitHub (Jul 2, 2025): c++版本的有这种逻辑,rust版本我也没看到这个逻辑,目前看rust版本就是读已提交
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/3FS#153
No description provided.