Merged
Size
L
Change Breakdown
Performance60%
Feature30%
Refactor10%
#3368feat(server): add TaskIdentifier registry to replace expensive distinct query

Task filtering queries optimized and archived tasks grouped

An expensive database query used for task filter dropdowns has been replaced with a Redis-backed registry, reducing database load and enabling visual grouping of archived tasks.

In heavily trafficked environments, generating task filter dropdowns previously required an expensive database query that consumed over 7% of database runtime. This bottleneck is being eliminated by introducing a dedicated task registry backed by Redis.

Environments are automatically migrated to this new registry during deployment. Simultaneously, the execution pipeline is being optimized so that high-frequency background worker queries are routed directly to a read replica, significantly reducing the load on the primary database.

For end users navigating the dashboard, the filtering experience is much cleaner. Filter dropdowns no longer show duplicate entries if a task's trigger source changes. Furthermore, removed tasks are neatly organized under an "Archived" section, preventing stale data from cluttering the main active list.

View Original GitHub Description

Replace the expensive DISTINCT query for task filter dropdowns with a dedicated TaskIdentifier registry table backed by Redis. Environments migrate automatically on their next deploy, with a transparent fallback to the legacy query for unmigrated environments. Also fixes duplicate dropdown entries when a task changes trigger source, and adds active/archived grouping for removed tasks. Moves BackgroundWorkerTask reads in the trigger hot path to the read replica.

© 2026 · via Gitpulse