[Feature] Maintain source-backed primary-key BTree indexes during compaction

Abierto
#291 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp
Área
databases

Línea de trabajo

Comienza leyendo la implementación referenciada en #245 y la ruta de lectura de primary key respaldada por el código fuente de #192 y #194. Rastrea los formatos de almacenamiento existentes y las abstracciones internas de reader y writer, manifest, path, sort-buffer y commit. Se considera terminado cuando las escrituras en fixed-bucket y la compactación mantienen payloads por campo y de nivel positivo, mientras que la limpieza y las compilaciones fallidas preservan un fallback seguro mediante scan.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Search before asking
  • I searched in the issues and found nothing similar.
Motivation

#192 and #194 added the source-backed primary-key BTree read path. Paimon C++ writers still need the corresponding maintenance path: after compaction changes the active source files of a data level, a missing or stale payload leaves that level uncovered and queries fall back to normal file scans.

Paimon C++ should maintain these payloads during fixed-bucket primary-key writes and compaction, using the existing Java-compatible source metadata, BTree payload format, and index manifests.

Solution

Add the source-backed primary-key BTree maintenance lifecycle for fixed-bucket primary-key tables:

  1. Validate the Java-equivalent table and index prerequisites.
  2. Restore committed source-backed payload metadata into bucket writers without mixing Data Evolution payloads.
  3. Build one payload per indexed field and positive data level from physical source rows, then commit matching index additions and deletions in the same snapshot as the data changes.
  4. Reconcile missing, stale, duplicate, replaced, removed-definition, and empty-level payloads during compaction.
  5. Isolate build failures to the affected field and level so reads safely fall back to normal scans and a later maintenance attempt can rebuild the payload.
  6. Retain live index files during snapshot expiration and orphan cleanup, including tag and branch safety and external-file deletion retries.

Reuse the existing storage formats and internal reader, writer, sort-buffer, path, manifest, and commit abstractions. Do not introduce a new index family or storage protocol.

The implementation is in #245. It keeps maintenance synchronous; Java asynchronous scheduling, manual rebuild actions, realtime writers, and postpone-bucket writers remain outside this scope.

Anything else?

This is a maintenance-path follow-up to the read-path work in #192 and #194. It ports an existing Java capability, so no separate PIP is proposed.

Are you willing to submit a PR?
  • I'm willing to submit a PR!
Lenguaje dominante
C++
Estrellas
65
Forks
29
Merge medio
2 d 30 min
PR fusionados (30 d)
77

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/paimon-cpp

Todos los issues de apache/paimon-cpp

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.