Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#4,489 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@zhang-arvin đang làm issue này rồi.

Từ ngày 28/9/2026.

  • #4492 của @zhang-arvin — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu trong fluss-server/.../kv/snapshot/PeriodicSnapshotManager.java tại triggerSnapshot(), sau đó so sánh nhánh lỗi khởi tạo với cơ chế xử lý lỗi bất đồng bộ hiện có và luồng scheduleNextSnapshot(). Xác minh rằng lỗi khởi tạo tạm thời không kết thúc chuỗi one-shot và các lần thử snapshot được tiếp tục sau khi backend hoạt động trở lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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!
Ngôn ngữ chính
Java
Star
2.2k
Fork
656
Merge trung bình
1 ngày 21 giờ
Pull request đã merge (30 ngày)
127

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/fluss

Tất cả issue của apache/fluss

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.