fix bug-1060 bug-1067

This commit is contained in:
Rongsong Shen 2026-06-24 17:05:43 +08:00
parent 6067ba6c94
commit 61e1391cd0
28 changed files with 7021 additions and 2926 deletions

View file

@ -1372,6 +1372,11 @@ int cluster_init_phase2(cluster_t* c)
* receiver overwrites already-consistent records instead of fetching only
* the missing suffix (Raft incremental catch-up). */
ha_sync_applied_lsn_from_recovery(&c->ha, &c->persist);
/* bug-1042: also raise the raft LIBRARY's log_len/commit_index to the
* recovered position. ha_init_raft ran BEFORE this recovery on the standby-
* rejoin boot, so without this the library stays at log_len=0 and rejects
* every AppendEntries (logOk fail) — wedging the rejoined member forever. */
ha_sync_raft_log_from_recovery(&c->ha, &c->persist);
INFO("HA: persist_recover done — recovered durable_floor=%" PRIu64
" current_lsn=%" PRIu64 "; applied_lsn=%" PRIu64
" advertised for catch-up",