-
Notifications
You must be signed in to change notification settings - Fork 24
support manual trigger snapshot creation function #840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #840 +/- ##
==========================================
- Coverage 56.51% 49.44% -7.08%
==========================================
Files 108 110 +2
Lines 10300 11460 +1160
Branches 1402 5432 +4030
==========================================
- Hits 5821 5666 -155
+ Misses 3894 2096 -1798
- Partials 585 3698 +3113 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
No need, found the root cause is we didn't save receiving_snapshot_ in srv_state |
a1d18dd to
4d2e80e
Compare
9b8f510 to
0adfb81
Compare
| // Note that manual compact may cause concurrency issue with the automatic log compaction in raft server. Currently, | ||
| // it doesn't matter because this API is used in op scenario when members syncup and no new write are handled. If we | ||
| // want to use it in more phase, we need to add lock to avoid concurrency issue. | ||
| if (compact_lsn > 0 && m_compact_lsn.load() < compact_lsn) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we just want to compact logs to make sure new member catch up by BR, and compact during create_snasphot has been triggered, we don't need compact again here. If we want to truncate logs upto compact_lsn, we need it here.
0adfb81 to
3d66023
Compare
3d66023 to
ee8a6c1
Compare
Add manual snapshot creation API for log truncation control with 3 capabilities: