Fix blocking collection matching with large plugins

This commit is contained in:
2026-10-05 10:15:48 -04:00
parent 10663333db
commit dbd2940d29
14 changed files with 319 additions and 39 deletions
+7
View File
@@ -369,6 +369,13 @@ export function db(): Database.Database {
backfillLeaderboard(handle);
initializeFleetSettings(handle);
migrateNativeInstances(handle);
// Lifecycle history is retained indefinitely. Admission and status reads
// must narrow by server or active state instead of scanning that history.
// Install after migrations that rebuild this table or add server_deleted_at.
handle.exec(`CREATE INDEX IF NOT EXISTS idx_server_deployments_server
ON server_deployments(server, server_deleted_at);
CREATE INDEX IF NOT EXISTS idx_server_deployments_state
ON server_deployments(state, action, server_deleted_at);`);
installReportRevisions(handle);
} catch (err) {
handle.close();
+3 -2
View File
@@ -516,8 +516,9 @@ CREATE TABLE IF NOT EXISTS server_launch_previews (
deployment_id TEXT REFERENCES server_deployments(id) ON DELETE CASCADE
);
-- Historical launch files survive library deletion. New launches resolve current
-- promotions instead of replaying these snapshots; credentials stay in their stores.
-- Queued plans contain metadata only. Attempted launch files survive library
-- deletion. New launches resolve current promotions instead of replaying these
-- snapshots; credentials stay in their stores.
CREATE TABLE IF NOT EXISTS server_launch_recipes (
deployment_id TEXT PRIMARY KEY REFERENCES server_deployments(id) ON DELETE CASCADE,
recipe TEXT NOT NULL,