Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): make SQLite checkpoints durable on macOS #14457

ClosedSoroushRF(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/14457/headopened View on GitHub

Showing 4 changed files with 32 additions and 0 deletions (loading 1).

x
0 of 4 viewed, 4 left
19 additions and 0 deletionsapps/server/scripts/t3-sqlite-state.test.tsModified
View file
@@ -75,6 +75,25 @@
}),
);
​
+ it.effect("enables checkpoint_fullfsync on its direct connection", () =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const baseDir = yield* fs.makeTempDirectoryScoped({ prefix: "t3-sqlite-state-fsync-" });
+ yield* createFixtureDatabase(baseDir);
+​
+ const result = yield* runSqliteState({
+ operation: "query",
+ baseDir,
+ sql: "PRAGMA checkpoint_fullfsync",
+ });
+​
+ assert.equal(result.operation, "query");
+ if (result.operation === "query") {
+ assert.deepStrictEqual(result.rows, [{ checkpoint_fullfsync: 1 }]);
+ }
+ }),
+ );
+​
it.effect.skipIf(!symlinksSupported)(
"backs up isolated state before writes and refuses the shared home",
() =>
3 additions and 0 deletionsapps/server/scripts/t3-sqlite-state.tsModified
View file