重构:优化记录格式并修复核心功能
- 修改记录存储格式为 [4B len][8B offset][4B CRC][16B UUID][data] - 修复 TopicProcessor 中 WaitGroup 使用错误导致 handler 不执行的问题 - 修复写入保护逻辑,避免 dirtyOffset=-1 时误判为写入中 - 添加统计信息定期持久化功能 - 改进 UTF-8 字符截断处理,防止 CJK 字符乱码 - 优化 Web UI:显示人类可读的文件大小,支持点击外部关闭弹窗 - 重构示例代码,添加 webui 和 webui_integration 示例 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -162,10 +162,10 @@ func TestQueryWithIndex(t *testing.T) {
|
||||
t.Fatalf("写入失败: %v", err)
|
||||
}
|
||||
}
|
||||
writer.Close()
|
||||
defer writer.Close()
|
||||
|
||||
// 2. 创建查询器(使用共享索引)
|
||||
query, err := NewRecordQuery(logPath, index)
|
||||
query, err := NewRecordQuery(logPath, index, writer)
|
||||
if err != nil {
|
||||
t.Fatalf("创建查询器失败: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user