Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[server] KV snapshot scheduling stops permanently after a transient snapshot-init failure

Aperta Adatta ai principianti
#4,489 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@zhang-arvin ci sta già lavorando.

Dal 28/9/2026.

  • #4492 di @zhang-arvin — aperta

Valutazione

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

Direzione di ricerca

Inizia da fluss-server/.../kv/snapshot/PeriodicSnapshotManager.java, in triggerSnapshot(), quindi confronta il percorso di errore di inizializzazione con la gestione asincrona degli errori esistente e il flusso di scheduleNextSnapshot(). Verifica che un errore di inizializzazione transitorio non interrompa la catena one-shot e che i tentativi di snapshot riprendano dopo che il backend è tornato disponibile.

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

Descrizione

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

main (development)

Please describe the bug

I searched in the issues and found nothing similar. Closest family:

  • #2977
  • #2978, A different start-time trigger, already fixed.
Motivation

A transient backend outage during snapshot initialization permanently disables KV snapshots for the affected buckets until the TabletServer restarts. The failure is silent after a single ERROR line: no retry, no metric alarm, no recovery when the backend returns.

Reproduction
  • Fluss 1.0.0 (also present on main, file is identical), 1 coordinator + 2 tablet servers, kv.snapshot.interval: 60s, S3-compatible remote storage.
  • Stop the object store for ~6 minutes, then restore it.
  • During the outage, tablets log Connection refused with AWS SDK retries; writes keep flowing (local hot path, unaffected).
  • After the backend returns: no new snapshot for 14+ minutes (~14 missed 60s cycles). Only snap-1/snap-2 remain (retention keeps the last two).
  • Restarting one tablet produces a fresh snapshot ~50s later (snap-4), confirming the scheduler — not the backend path — was dead.
Root cause

fluss-server/.../kv/snapshot/PeriodicSnapshotManager.java, triggerSnapshot() (v1.0.0 and main identical):

try {
    snapshotRunnableOptional = target.initSnapshot();
} catch (Exception e) {
    LOG.error("Fail to init snapshot during triggering snapshot.", e);
    return;   // <-- scheduleNextSnapshot() never called
}

Scheduling is a one-shot chain (schedule(triggerSnapshot, delay) + explicit scheduleNextSnapshot()), so returning here without rescheduling breaks the chain permanently for that bucket. The async-phase failure path (whenComplete) does track retries; only the init path drops the chain.

Observed log line proving the trigger:
ERROR org.apache.fluss.server.kv.snapshot.PeriodicSnapshotManager [] - Fail to init snapshot during triggering snapshot.

followed by total silence (no further attempts, successes, or failures).

Solution

Call scheduleNextSnapshot() on the init-failure path too (ideally with backoff after consecutive failures, mirroring the existing numberOfConsecutiveFailures tracking in the async path), so a transient backend outage degrades to missed snapshots instead of a permanently dead scheduler.

Are you willing to submit a PR?
  • I'm willing to submit a PR!
Lingua principale
Java
Stelle
2.2k
Fork
656
Merge medio
1g 21h
PR unite (30g)
127

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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/fluss

Tutte le issue di apache/fluss

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.