Repository navigation
fix(#11250): quarantine and resync a database whose crash recovery did not complete (#11259) [skip ci] - #11259
Conversation
…ned and resynced instead of serving Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 24 minutes. View limit details
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. CodeRabbit Verify
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 5 |
🟢 Coverage 76.32% diff coverage · -4.63% coverage variation
Metric Results Coverage variation ✅ -4.63% coverage variation Diff coverage ✅ 76.32% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (fce9f92) 260052 227534 87.50% Head commit (730a03e) 292917 (+32865) 242742 (+15208) 82.87% (-4.63%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#11259) 38 29 76.32% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
Review of #11259: the change is small, reuses the existing quarantine machinery, and the unit tests are on point. I have no blocking concerns and see no security issue. I only read the diff; I did not build or run the tests. Points to check
Verdict: good fix for the partial scope, pending point 1. |
…come cannot be read Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Review of #11259 No blocking issues found. What it does well
Points to consider
Security: nothing concerning. There is no new input surface, dependency or external I/O. The change makes a node refuse to serve possibly damaged data. 🤖 Generated with Claude Code |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11259 +/- ##
============================================
- Coverage 79.40% 79.39% -0.01%
- Complexity 4997 4999 +2
============================================
Files 2327 2327
Lines 260052 260090 +38
Branches 56975 56985 +10
============================================
+ Hits 206487 206498 +11
- Misses 32559 32592 +33
+ Partials 21006 21000 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Refs #11250 (partial fix, see Coverage; the issue should stay open until the residue in #11258 is handled).
A node whose crash recovery stopped on a WAL gap (WAL preserved as
.corrupt, "Recovery ... did not complete") still rejoined Raft, won elections and answered reads.TransactionManagernow exposesisLastRecoveryIncomplete(), andRaftHAServer.start()quarantines every open database with an incomplete recovery under the new causeLOCAL_RECOVERY_INCOMPLETE. The existing quarantine machinery then refuses readiness, hands leadership off, persists across restarts and re-installs the database from the leader. A sole voter has no copy to resync from, so it only gets a SEVERE log (same reasoning as #9308).Test plan
Issue11250RecoveryOutcomeTest(engine): WAL-gap recovery reports incomplete, clean recovery does notIssue11250IncompleteRecoveryQuarantineTest(ha-raft): quarantine with the new cause, leadership hand-off, idempotence, sole voter exemptIssue7577ClusterStatusSchemaMatchesTheHandlerTest,Issue7735QuarantineSurvivesRestartTest,Issue9308SoleVoterApplyErrorTest,Issue4958PreservedWALTeststill passbank+ellesweep (cannot be run here)Coverage
quarantineDatabasesWithIncompleteRecovery()that enumerates open databases has no test against a real server (only its decision method is unit tested).Review cycles
Cycle 1: claude review had no blocking items. Applied: flag is now sticky (point 1), WARNING instead of FINE (point 3). Deferred: sole-voter status surfacing (point 2), real-server scan test (point 4, stated in Coverage), spec line width nit (point 5). Later cycles were not awaited by the agent; the developer owns the rest.