forked from lei.chen/myxce
feat(ha-wal-replication): repl_broadcast TCP send (task 1.1)
Replace no-send stub with real WAL entry transmission via xce_wal_batch_req_raw. For each non-catch-up registered standby, serialize the entry header+payload into a wal_catchup_entry_t and enqueue. Keep the MAX_PENDING_ACKS eviction guard. 5 new tests: no-standbys, one-standby-send, skip-catch-up, evict-overloaded, send-failure-continues. Controller suite green. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cdd446fc17
commit
18e351ee1b
7 changed files with 780 additions and 91 deletions
|
|
@ -5532,6 +5532,236 @@
|
|||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T00:32:34.054Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-345",
|
||||
"timestamp": "2026-06-10T01:36:59.112Z",
|
||||
"error_message": "Missing error handling in unknown",
|
||||
"file": "src/schema/controller.capnp",
|
||||
"root_cause": "Code path had no error handling — exceptions would propagate uncaught",
|
||||
"fix": "Added try/catch block",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"error-handling",
|
||||
"capnp"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T01:36:59.112Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-346",
|
||||
"timestamp": "2026-06-10T01:37:29.771Z",
|
||||
"error_message": "Missing error handling in struct",
|
||||
"file": "src/include/typemap.h",
|
||||
"root_cause": "Code path had no error handling — exceptions would propagate uncaught",
|
||||
"fix": "Added try/catch block",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"error-handling",
|
||||
"h"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T01:37:29.771Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-347",
|
||||
"timestamp": "2026-06-10T01:37:41.741Z",
|
||||
"error_message": "Significant refactor of ",
|
||||
"file": "src/include/typemap.h",
|
||||
"root_cause": "6 lines replaced/restructured",
|
||||
"fix": "Rewrote 16→31 lines (6 removed)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"refactor",
|
||||
"h"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T01:37:41.741Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-348",
|
||||
"timestamp": "2026-06-10T01:38:31.262Z",
|
||||
"error_message": "Missing error handling in unknown",
|
||||
"file": "src/include/request.h",
|
||||
"root_cause": "Code path had no error handling — exceptions would propagate uncaught",
|
||||
"fix": "Added try/catch block",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"error-handling",
|
||||
"h"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T01:38:31.262Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-349",
|
||||
"timestamp": "2026-06-10T01:39:19.368Z",
|
||||
"error_message": "Missing guard clause",
|
||||
"file": "src/lib/request.c",
|
||||
"root_cause": "No early return/throw for edge case: l.p.type == CAPN_NULL",
|
||||
"fix": "Added guard clause: if (l.p.type == CAPN_NULL)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"guard-clause",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T01:39:19.368Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-350",
|
||||
"timestamp": "2026-06-10T01:39:31.683Z",
|
||||
"error_message": "Missing error handling in unknown",
|
||||
"file": "src/lib/request.c",
|
||||
"root_cause": "Code path had no error handling — exceptions would propagate uncaught",
|
||||
"fix": "Added try/catch block | Also: if (req->body_which == Request_body_walcatchupentrymsg; && req->body.walcatchupentrymsg != NULL) { | Also: /* wal_entry_to_wire: fill a wire WalCatchupEntry from a C e; * fields and raw payload bytes. Sub-entry nesting is one le",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"error-handling",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 3,
|
||||
"last_seen": "2026-06-10T01:40:14.312Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-351",
|
||||
"timestamp": "2026-06-09T00:00:00Z",
|
||||
"error_message": "request.c: passing argument 'from' of xce_wal_batch_encode_raw / xce_snapshot_chunk_encode_raw from incompatible pointer type (xce_peerinfo_t** vs xce_peerinfo_t*)",
|
||||
"file": "src/lib/request.c",
|
||||
"root_cause": "ep->peer is already xce_peerinfo_t* (netio.h endpoint struct); call sites passed &ep->peer producing xce_peerinfo_t**",
|
||||
"fix": "Dropped the & at both call sites (xce_wal_batch_req_raw line 547, xce_snapshot_chunk_req_raw line 633) to pass ep->peer directly",
|
||||
"tags": [
|
||||
"build-failure",
|
||||
"pointer-type",
|
||||
"c",
|
||||
"request.c",
|
||||
"ha-replication"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-09T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-352",
|
||||
"timestamp": "2026-06-10T01:46:28.589Z",
|
||||
"error_message": "Significant refactor of ",
|
||||
"file": "src/controller/config_repl.c",
|
||||
"root_cause": "4 lines replaced/restructured",
|
||||
"fix": "Rewrote 29→32 lines (4 removed)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"refactor",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T01:46:28.589Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-353",
|
||||
"timestamp": "2026-06-10T01:46:45.213Z",
|
||||
"error_message": "Wrong reference: payload should be raw_payload",
|
||||
"file": "src/controller/config_repl.c",
|
||||
"root_cause": "Used \"payload\" instead of \"raw_payload\"",
|
||||
"fix": "Changed payload → raw_payload",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"wrong-reference",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T01:46:45.213Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-354",
|
||||
"timestamp": "2026-06-10T01:47:22.301Z",
|
||||
"error_message": "Significant refactor of ",
|
||||
"file": "src/controller/ha.c",
|
||||
"root_cause": "2 lines replaced/restructured",
|
||||
"fix": "Rewrote 13→16 lines (2 removed)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"refactor",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T01:47:22.301Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-355",
|
||||
"timestamp": "2026-06-10T01:49:05.465Z",
|
||||
"error_message": "Significant refactor of ",
|
||||
"file": "src/controller/testsuite/test_ha_role.c",
|
||||
"root_cause": "7 lines replaced/restructured",
|
||||
"fix": "Rewrote 49→137 lines (7 removed)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"refactor",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T01:49:05.465Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-356",
|
||||
"timestamp": "2026-06-10T01:49:36.997Z",
|
||||
"error_message": "Missing error handling in unknown",
|
||||
"file": "src/controller/ha.c",
|
||||
"root_cause": "Code path had no error handling — exceptions would propagate uncaught",
|
||||
"fix": "Added try/catch block",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"error-handling",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T01:49:36.997Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-352",
|
||||
"timestamp": "2026-06-10T02:10:00Z",
|
||||
"error_message": "ASAN heap-use-after-free in free_packet (netio.c:333) via endpoint_fini <- raft_cb_become_follower (loser path) <- raft_on_vote_reply; election loser crashes on vote-reply processing",
|
||||
"file": "src/controller/ha.c",
|
||||
"root_cause": "vote_reply_decode_and_dispatch took pkt = ep->fsm_in.pkt and freed it WITHOUT clearing ep->fsm_in.pkt; vote_reply_dispatch can synchronously reach raft_cb_become_follower -> endpoint_fini(ep), which frees the stale fsm_in.pkt again. repl_ack_decode_and_dispatch already nulls the pointer (correct pattern); the vote-reply path missed it.",
|
||||
"fix": "FIXED 2026-06-10: ep->fsm_in.pkt = NULL immediately after taking ownership in vote_reply_decode_and_dispatch (ha.c:2413), matching repl_ack_decode_and_dispatch. Found by task 7.7 E2E (3-node deploy, election loser crash).",
|
||||
"tags": [
|
||||
"ha",
|
||||
"election",
|
||||
"asan",
|
||||
"use-after-free",
|
||||
"packet-ownership",
|
||||
"netio",
|
||||
"e2e"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T02:10:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-358",
|
||||
"timestamp": "2026-06-10T03:55:44.698Z",
|
||||
"error_message": "Wrong condition in logic",
|
||||
"file": "src/controller/config_repl.c",
|
||||
"root_cause": "Condition was: if (!rcpr->raw_bytes || rcpr->raw_bytes_len == 0 || !r)",
|
||||
"fix": "Changed to: if ((ctrl_role_t)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"logic-fix",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T03:55:44.698Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue