Address review feedback from @Zhaoyikaiii: - Replace map[string]*sync.Mutex + separate mu with sync.Map.LoadOrStore for simpler, lock-free session lock management. - Add skip parameter to readMessages so callers (GetHistory, Compact) can skip truncated lines without paying the json.Unmarshal cost. - Add countLines helper for TruncateHistory's count reconciliation, avoiding full deserialization when only the line count is needed. |
||
|---|---|---|
| .. | ||
| jsonl.go | ||
| jsonl_test.go | ||
| migration.go | ||
| migration_test.go | ||
| store.go | ||