[Bug] Cluster rewrite closes the shared IOManager, breaking later spills of the same write

Aperta Adatta ai principianti
#10,066 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java, spark

Direzione di ricerca

Inizia da Sorter.close() e dal percorso clusterRewrite, quindi traccia la proprietà condivisa di IOManager e del buffer del sorter. Verifica il completamento eseguendo un bucketed append-only clustering che effettui lo spill su più gruppi senza FileNotFoundException e conferma che il RecordReaderIterator di input venga chiuso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

master

Compute Engine

Flink / Spark (bucketed append-only table clustering)

Minimal reproduce step

On a bucketed append-only table with clustering enabled, trigger a compaction whose write instance clusters more than one (partition, bucket) group, and give the sort buffer enough data to spill (a small write-buffer-size / small page size, or enough rows). The first group's clustering succeeds. The second one throws java.io.FileNotFoundException: .../paimon-io-*/....channel (No such file or directory) as soon as its sort buffer spills.

What doesn't meet your expectations?

Sorter.close() closes the IOManager it was handed. That IOManager belongs to the write and is shared by everything the write does, and its spill directories are created once, when the manager is constructed. Closing it deletes those directories, so after the first clustering round any later spill of the same write instance fails with FileNotFoundException.

Expected: clustering a table whose write spills across more than one group does not fail.

Anything else?

Fix direction: Sorter must not close the caller-owned IOManager. The sorter's own resources are released by buffer.clear(), which deletes its spill channels through the buffer's private SpillChannelManager, so nothing sorter-owned leaks. Separately, the sorter's input RecordReaderIterator was never closed by clusterRewrite; close it in Sorter.close().

Are you willing to submit a PR?
  • I'm willing to submit a PR!
Lingua principale
Java
Stelle
3.4k
Fork
1.4k
Merge medio
1g 14h
PR unite (30g)
468

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/paimon

Tutte le issue di apache/paimon

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.