#53577·milvus

[Enhancement]: Centralize metadata into shared MetaStore for MixCoord

Author: tedxuCreated Sep 17, 2026Updated Sep 17, 2026

In MixCoord mode, DataCoord and QueryCoord maintain duplicate copies of segment metadata, channel checkpoints, and collection info. This leads to inconsistencies and wasted memory.

This PR introduces a centralized MetaStore (MetaView for reads, MetaStore for writes) in the metacache package. DC writes segment state, checkpoint positions, and file resources through MetaStore; QC reads the same data via MetaView. DC meta becomes a thin overlay that only tracks transient runtime state (isCompacting, allocations, lastFlushTime, computed caches).

Key changes:

  • Move channel checkpoint logic (timestamp comparison, logging, metrics) from DC meta into MetaStore
  • Move file resource logic (duplicate check, name lookup) into MetaStore
  • Move segment persistence (catalog calls, in-memory map update, DataCoordNumSegments metric emission) into MetaStore
  • Eliminate segMetricMutation type entirely from DC
  • QC resolves segments on demand from MetaView instead of copying full protos

Net result: ~550 lines removed, one source of truth for metadata.