fix(storage): 修复 EnsureMeta nil panic 并完善 SSTable 工程化细节#30
Conversation
- EnsureMeta() 检查 os.Open 错误, 使用 io.ReadFull 替代裸 file.Read()
- 修复 ISSTable 接口签名与实现不匹配(GetLevelFiles/AddMata/RemoveMata 等)
- ReadAllFromSSTable 中使用 io.ReadFull 确保完整读取
- file.Stat() 错误不再被丢弃(2处)
- MergeSSTable 中 binary.Write/file.Write 增加错误检查
- writeToSSTable→WriteToSSTable(导出以匹配接口)
- 添加编译期接口断言 var _ istorage.ISSTable = &SSTable{}
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughSSTable I/O operations are refactored with explicit, typed interface contracts and hardened error handling. The ChangesSSTable I/O Hardening and Interface Refactor
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary by CodeRabbit
Bug Fixes
Refactor