diff --git a/server/src/WebDrop.Storage/SqliteChannelStore.cs b/server/src/WebDrop.Storage/SqliteChannelStore.cs index 84ddf2a..ca8951c 100644 --- a/server/src/WebDrop.Storage/SqliteChannelStore.cs +++ b/server/src/WebDrop.Storage/SqliteChannelStore.cs @@ -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)); }