Skip to content

feat: adjust snapshot interval, reduce the amount of raft log replay - #1057

Merged
tomatoishealthy merged 1 commit into
mainfrom
feat/raft-snapshot-accelerate
Sep 2, 2026
Merged

tomatoishealthy merged 1 commit into
mainfrom
feat/raft-snapshot-accelerate

Conversation

@tomatoishealthy

@tomatoishealthy tomatoishealthy commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Performance
    • Snapshots are now created more frequently, with the interval reduced to 30 seconds.
    • The snapshot threshold has been lowered to 200.

@tomatoishealthy
tomatoishealthy requested a review from a team as a code owner September 2, 2026 06:10
@tomatoishealthy
tomatoishealthy requested review from twcctop and removed request for a team September 2, 2026 06:10

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: bb584a3a-579f-4d13-8b38-80618ed459f6

📥 Commits

Reviewing files that changed from the base of the PR and between 5edbc69 and 16fc278.

📒 Files selected for processing (1)
  • node/hakeeper/config.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The default snapshot interval changes from 120 seconds to 30 seconds. The default snapshot threshold changes from 8192 to 200. TrailingLogs remains 1200.

Changes

Snapshot configuration

Layer / File(s) Summary
Update snapshot defaults
node/hakeeper/config.go
DefaultConfig() now sets Interval to 30 seconds and Threshold to 200. TrailingLogs remains unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: 🔵 Low · up to 16fc2

This makes HAKeeper create Raft snapshots and compact logs much more often, which should reduce replay time but may increase storage and runtime work during busy periods. The change is mergeable with owner awareness of snapshot latency and availability behavior under production workloads.

Suggested reviewers: dylancai9

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes both main changes: the snapshot interval adjustment and the reduction in Raft log replay.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/raft-snapshot-accelerate

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tomatoishealthy
tomatoishealthy merged commit 1269520 into main Sep 2, 2026
13 checks passed
@tomatoishealthy
tomatoishealthy deleted the feat/raft-snapshot-accelerate branch September 2, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants