Avoid recursive standby retries on allocation failure
This commit is contained in:
1 parent
f92077e601
commit
d532fe062e
2 files changed
+12
-8
No files matched your search
@@ -1,4 +1,4 @@
|
||||
// test_db_sync.c — sync protocol test: peer_empty, hash_MATCH, divergence merge
|
||||
// test_db_sync.c — реальный MESSAGES/PUSH: пустой пир, новые записи, расхождение и слияние истории.
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "../lib/debug_config.h"
|
||||
#include "../lib/mem.h"
|
||||
|
||||
#define TEST_TIMEOUT_TB 300000 // 12s
|
||||
#define TEST_TIMEOUT_TB 300000 // 30s
|
||||
#define PHASE_TIMEOUT_TB 100000 // 10s per phase
|
||||
#define POLL_INTERVAL_MS 1
|
||||
|
||||
@@ -278,8 +278,7 @@ int main(void) {
|
||||
if (!wait_for("links up", cond_links_init, PHASE_TIMEOUT_TB)) { test_phase = 2; goto done; }
|
||||
|
||||
// ===================================================================
|
||||
// Phase 1: peer_empty. add_quiet (no auto-sync) → insert A=5,
|
||||
// reinitiate → INIT_SYNC(5) → B INIT_RESP(ch8=0,sc=0) → A sends all 5.
|
||||
// Phase 1: пустой пир получает пять проверенных записей через общий Merkle.
|
||||
// ===================================================================
|
||||
printf("Phase 1: peer_empty\n");
|
||||
reset_done_flags();
|
||||
@@ -295,9 +294,7 @@ int main(void) {
|
||||
printf(" PASS\n");
|
||||
|
||||
// ===================================================================
|
||||
// Phase 2: hash_MATCH tail-send. Insert 3 more on A (PUSH disabled —
|
||||
// si_a from phase 1 has sync_state=2? No, reinitiate set it to 1, then
|
||||
// SYNC_DONE set it to 2. Disable PUSH, insert, reinitiate.
|
||||
// Phase 2: приостанавливаем обмен, добавляем три записи и возобновляем обе стороны.
|
||||
// ===================================================================
|
||||
printf("Phase 2: hash_MATCH tail-send\n");
|
||||
reset_done_flags();
|
||||
|
||||
Reference in new issue
Block a user