Immutable catalog generation implementation plan
Issue: #49
Outcome
Catalog discovery and DataFusion listing pin one immutable Arc containing both table names and schemas. Refresh atomically replaces the Arc, eliminating mixed-generation responses and full-listing clones.
Steps
- Replace mutable snapshot contents with
RwLock<Arc<CatalogGeneration>>and expose read-only generation accessors. - Publish a newly built generation only after successful complete refresh.
- Route Query/Flight schema and table discovery through one pinned Arc.
- Add deterministic pointer-identity, refresh-isolation, failure, and Flight response tests.
- Run strict clippy, spec lifecycle, full gate, review, and verification.
Safety properties
- Old generations remain valid for in-flight readers until their Arc drops.
- Names and schemas are immutable and share one publication boundary.
- Failed refresh cannot mutate or replace the last-good allocation.
- Pointer cloning is O(1); iteration cost follows the requested response.