fix(ha-repl-hardening): wire snapshot production path (task 3.5b)
- SEND_SNAPSHOT uses checkpoint_lsn (not committed_lsn) for file lookup - ha_send_snapshot_to_standby stats file for actual total_size - ha_compute_oldest_wal_lsn scans WAL dir for min segment LSN - Removed hardcoded 131072 and oldest_wal_lsn=0 placeholders
This commit is contained in:
parent
834ab4d5e7
commit
318098c727
5 changed files with 43 additions and 18 deletions
|
|
@ -1548,8 +1548,8 @@ static void test_snapshot_transfer_two_chunks(void)
|
|||
xce_snapshot_chunk_hook = snaptest_hook;
|
||||
snaptest_reset();
|
||||
|
||||
extern int ha_send_snapshot_to_standby(endpoint_t *, const char *, uint64_t, uint64_t);
|
||||
int rc = ha_send_snapshot_to_standby(NULL, tmpdir, lsn, 131072);
|
||||
extern int ha_send_snapshot_to_standby(endpoint_t *, const char *, uint64_t);
|
||||
int rc = ha_send_snapshot_to_standby(NULL, tmpdir, lsn);
|
||||
TEST_ASSERT_EQUAL_INT(0, rc);
|
||||
|
||||
TEST_ASSERT_EQUAL_INT(2, g_snaptest_chunk_count);
|
||||
|
|
@ -1591,8 +1591,8 @@ static void test_snapshot_transfer_small_less_than_one_chunk(void)
|
|||
xce_snapshot_chunk_hook = snaptest_hook;
|
||||
snaptest_reset();
|
||||
|
||||
extern int ha_send_snapshot_to_standby(endpoint_t *, const char *, uint64_t, uint64_t);
|
||||
int rc = ha_send_snapshot_to_standby(NULL, tmpdir, lsn, 64);
|
||||
extern int ha_send_snapshot_to_standby(endpoint_t *, const char *, uint64_t);
|
||||
int rc = ha_send_snapshot_to_standby(NULL, tmpdir, lsn);
|
||||
TEST_ASSERT_EQUAL_INT(0, rc);
|
||||
|
||||
TEST_ASSERT_EQUAL_INT(1, g_snaptest_chunk_count);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue