fix: increase safeInventoryLimit to 50000
All checks were successful
deploy / deploy (push) Successful in 45s

Proof:
When inventory-sync was down for 2 days, 385k snapshots were produced. 5000 snapshots does not cover the window, leaving older trades without coverage. Increased to 50000 to cover 4 days of history.

Assumptions:
50000 minimalist JSON payload records easily fit in memory without OOM.

Still fake:
N/A
This commit is contained in:
philipp 2026-06-16 16:11:53 +02:00
parent ee01bf5149
commit 62315082ea

View file

@ -4473,10 +4473,10 @@ export async function refreshQuoteOutcomes(pool, {
eureAsset = null,
now = Date.now(),
submissionLimit = 1000,
inventoryLimit = 5000,
inventoryLimit = 50000,
} = {}) {
const safeSubmissionLimit = Math.max(1, Number(submissionLimit) || 1000);
const safeInventoryLimit = Math.max(1, Number(inventoryLimit) || 5000);
const safeInventoryLimit = Math.max(1, Number(inventoryLimit) || 50000);
const submissionsResult = await pool.query(
`
SELECT event_id, observed_at, ingested_at, quote_id, payload
@ -5193,7 +5193,7 @@ export async function refreshIntentRequestOutcomes(pool, {
const safePreflightLimit = Math.max(1, Number(preflightLimit) || 100);
const safeSubmissionLimit = Math.max(1, Number(submissionLimit) || 500);
const safeInventoryLimit = Math.max(1, Number(inventoryLimit) || 5000);
const safeInventoryLimit = Math.max(1, Number(inventoryLimit) || 50000);
const preflightResult = await loadIntentRequestPreflightRefreshCandidates(pool, {
limit: safePreflightLimit,
});