NOSSLETTER.techLIVE
back to archive

feat: extract QueryView coordinator components

Language: Go+24531 -2789feature
concepts demonstrated
Immutable data structuresSnapshot isolationBackground batch processingConfiguration-driven resource management
The Issue & Context

Previously, the QueryView coordinator tightly coupled load management, scheduling, schema lifecycle, and readiness protocols, making it difficult to maintain and extend these components independently.

Root Cause Analysis

The monolithic design mixed responsibilities such as load snapshot handling, replica allocation, scheduling cost calculations, schema persistence, and readiness tracking within a single coordinator module, leading to complex dependencies and limited modularity.

Solution Strategy & Architectural Pattern

This PR extracts distinct components within the QueryView coordinator: immutable load snapshots and placement management, scheduling with cost-based reconciliation using immutable LogicalSize weights, schema lifecycle management with certified read schemas and snapshot bindings, and readiness protocols with scoped loading and progress fences. It introduces interfaces like LoadInfoCatalog and PrepareDataViewSchema to decouple dependencies and retains legacy recovery paths while removing compatibility for unreleased formats.

Key Takeaway for Contributors

Splitting complex coordination logic into well-defined, immutable components with clear interfaces improves maintainability and enables incremental integration of new features without disrupting existing workflows.