mirror of
https://github.com/simonw/datasette.git
synced 2026-10-20 08:17:00 +02:00
Spike: SchemaWatcher keeps the _internal catalog current off the request path
Per-database schema_watch modes (owned / external / immutable): - write path reads PRAGMA schema_version after every write task and rebuilds that one database's catalog before the write returns - external files are polled with a stat() fingerprint prefilter (racily-clean fingerprints re-verified), PRAGMA schema_version only on change, rebuild only when the version moved or the inode changed - immutable databases are scanned once - remove_database deletes its catalog rows explicitly; startup deletes rows for databases that are not attached (no per-refresh full scans) - catalog reads use one short-lived connection per database inside one read transaction; shared-cache memory databases go through their write thread - replaced/deleted files invalidate cached connections (generation) - fingerprints persisted in catalog_databases.fingerprint (migration 0002) so restarts skip unchanged files - new setting schema_watch_interval_ms (default 1000, 0 = no polling) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EwkLo2rJWidpkDVT3HkvNv
This commit is contained in:
parent
cec5e6b2ef
commit
7a3c534ced
12 changed files with 1727 additions and 158 deletions
|
|
@ -767,6 +767,7 @@ async def test_settings_json(ds_client):
|
|||
"template_debug": False,
|
||||
"trace_debug": False,
|
||||
"base_url": "/",
|
||||
"schema_watch_interval_ms": 1000,
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue