对于读存在提交版本和缓存版本的疑问
- Dominant language
- C++
- Stars
- 10.2k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
你好,我看设计笔记里提到: When there are both committed and pending versions, the service replies a special status code to notify the client.
和这部分代码
`Result 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));
}`
请问是我看的逻辑有遗漏吗
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.