8000
Skip to content

Keep indexer column metadata consistent with archive lifecycle #2480

Description

@coderabbitai

Summary

Track consistency gaps in indexer column metadata. The archive metadata commit is transactional and idempotent, but the <dataset>_column_metadata tables do not have the same consistency guarantee.

Current inconsistency

  • A compression task can succeed when its update to the indexer table fails.
  • Retention-based archive GC removes archives without removing their related column metadata from the indexer table.
  • Therefore, <dataset>_column_metadata can omit schemas for existing archives and contain schemas for archives that no longer exist.

Required work

  1. Document the current consistency behaviour and its limits for <dataset>_column_metadata.
  2. Design and implement an all-or-nothing update path. The indexer should pass its results to the compression job commit stage so that archive metadata and indexer metadata commit together.
  3. Design and implement a method for archive GC to identify and remove column metadata that belongs to removed archives.

Affected areas

  • Compression jobs and their commit stage.
  • indexer result handling and indexer-table updates.
  • Retention-based archive GC.
  • User documentation for compression and indexer metadata consistency.

Acceptance criteria

  • Documentation states that the archive metadata guarantee does not currently apply to <dataset>_column_metadata.
  • The proposed implementation defines failure and retry behaviour for combined archive and indexer metadata updates.
  • Compression jobs do not report success after an indexer metadata update failure when all-or-nothing semantics are enabled.
  • Archive GC keeps column metadata consistent with removed archives.
  • Tests cover compression failure, indexer update failure, retry, and archive GC cases.

Context

Requested by @LinZhihao-723 during review of PR #2456.

Discussion: #2456 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

0