Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): route SQLite reads around writer contention #23902

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/23902/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 21 changed files with 12 additions and 6 deletions (loading 18).

x
0 of 21 viewed, 21 left
2 additions and 1 deletionapps/server/src/mcpApps/McpAppModelContext.tsModified
View file
@@ -1,5 +1,6 @@
import type { ThreadId, TurnItemId } from "@t3tools/contracts";
import * as Context from "effect/Context";
+import * as NodeSqliteClient from "@t3tools/shared/nodeSqliteClient";
import * as DateTime from "effect/DateTime";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
@@ -83,7 +84,7 @@
OR run.thread_id <> context.thread_id
ORDER BY context.updated_at, context.item_id
- `.pipe(Effect.mapError(fail));
+ `.pipe(NodeSqliteClient.readOnly, Effect.mapError(fail));
});
​
return McpAppModelContext.of({ set, forThread });
6 additions and 4 deletionsapps/server/src/orchestration-v2/legacy/LegacyV1ThreadImporter.tsModified
View file
@@ -22,6 +22,7 @@
TurnItemId,
} from "@t3tools/contracts";
import * as KeyedLock from "@t3tools/shared/KeyedLock";
+import * as NodeSqliteClient from "@t3tools/shared/nodeSqliteClient";
import * as Cause from "effect/Cause";
import * as Context from "effect/Context";
import * as DateTime from "effect/DateTime";
@@ -359,7 +360,7 @@