fix(storage): defer concurrent SQLite read transactions
ci/woodpecker/manual/ci Pipeline was successful

This commit is contained in:
justme committed 2026-10-02 11:12:05 +08:00
1 parent 6339f6728d
commit 3abac991f0
1 file changed
+2 -1
@@ -38,7 +38,8 @@ public sealed class SqliteChannelStore : IResourceStore, IDisposable
{
using var conn = Open();
// 显式事务让一次 Read 内的多条查询看到同一份快照
using var tx = conn.BeginTransaction();
// 读事务延迟到首次访问时才取快照,避免并发读预检抢占 SQLite 写锁。
using var tx = conn.BeginTransaction(deferred: true);
return action(new SqliteTx(conn));
}