You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Route sessions replication via ClickhouseFactory, gate replication services on factory readiness, and tighten review-comment fixes
- SessionsReplicationService now takes ClickhouseFactory; #flushBatch buckets per
org and routes each bucket to the org's ClickHouse (mirrors runs replication).
- sessionsReplicationInstance gates service.start() on clickhouseFactory.isReady()
and owns SIGTERM/SIGINT shutdown — collapsed entry.server.tsx's 35-line block to
a single bootstrapping reference. Prevents misrouting org-scoped writes to the
default cluster while the registry is still loading.
- Factory: added sessions_replication ClientType + default singleton (parallels
runs replication), converted the events client to a singleton (was building two
pools to the same URL for v1/v2 repos), added missing startTimeMaxAgeMs to the
clickhouse_v2 case.
- Converted non-hot-path callers (runEngineHandlers, services, route handlers)
from sync resolveEventRepositoryForStore to async getEventRepositoryForStore so
they await registry readiness too. Sync now reserved for OTEL exporter and the
replication services, which gate startup on isReady.
- resolveEventRepositoryForStore is now non-exported with a JSDoc note explaining
when sync-bypass-with-isReady-gating is justified.
- Minor review fixes: tryCatch from @trigger.dev/core/utils subpath, safeParse +
400 response in admin.data-stores add/update branches, otlpExporter await moved
past the content-type check so the unsupported branch short-circuits.
- TestReplicationClickhouseFactory routes both replication and sessions_replication
to the test client; sessions replication tests updated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments