feat(ha-repl-hardening): batch WAL streaming from decision loop (task 3.4)

ha_stream_wal_to_standby() reads WAL from committed_lsn range, accumulates
entries to 256/64KB per batch, enqueues all via xce_request() (non-blocking).
Partial final batch sent immediately. Wired into STREAM_WAL case.
3 tests: 500-entries/2-batches, partial batch, empty range.
Fixed stale task-number comments per review.
This commit is contained in:
Rongsong Shen 2026-06-04 17:57:55 +00:00
parent d1c7872d73
commit 6b69a47c50
7 changed files with 469 additions and 20 deletions

View file

@ -428,7 +428,7 @@ static void test_dispatch_repl_action_push_config_when_tag_behind(void)
ha->standby_reported_lsn[0] = 100;
int rc = ha_dispatch_repl_action_for_standby(
ha, /*c=*/NULL, /*peer_idx=*/0,
ha, /*c=*/NULL, /*ep=*/NULL, /*peer_idx=*/0,
/*committed_tag=*/5, /*committed_lsn=*/100, /*oldest_wal_lsn=*/0);
(void)rc;
@ -465,7 +465,7 @@ static void test_dispatch_repl_action_no_push_when_converged(void)
ha->standby_reported_lsn[0] = 100;
int rc = ha_dispatch_repl_action_for_standby(
ha, /*c=*/NULL, /*peer_idx=*/0,
ha, /*c=*/NULL, /*ep=*/NULL, /*peer_idx=*/0,
/*committed_tag=*/5, /*committed_lsn=*/100, /*oldest_wal_lsn=*/0);
(void)rc;