fix(libxce-failover): classify and propagate netio I/O errors on failover

Add io_classify_io_error and propagate endpoint/epoll errors through
endpoint_update_epoll and cbuf_get instead of swallowing them, so client
failover surfaces the real error rather than hanging. Adds netio arm-failure,
close-propagation, and request send-propagation tests.

Pre-existing uncommitted work, committed to establish a clean baseline before
ha-commit-durability implementation.
This commit is contained in:
Rongsong Shen 2026-06-18 04:17:07 +00:00
parent 749e194207
commit 80bb1d766e
7 changed files with 347 additions and 41 deletions

View file

@ -335,8 +335,8 @@ int xce_request(endpoint_t* ep, xce_request_t* req)
return rc;
}
endpoint_enq(ep, &(pkt->link));
return 0;
int enq_rc = endpoint_enq(ep, &(pkt->link));
return (enq_rc < 0) ? enq_rc : 0;
}
int xce_reply(endpoint_t* ep, xce_peerinfo_t* from, xce_reply_t* reply)
@ -371,8 +371,8 @@ int xce_reply(endpoint_t* ep, xce_peerinfo_t* from, xce_reply_t* reply)
return rc;
}
endpoint_enq(ep, &(pkt->link));
return 0;
int enq_rc = endpoint_enq(ep, &(pkt->link));
return (enq_rc < 0) ? enq_rc : 0;
}
/*
@ -453,8 +453,8 @@ int xce_replconfigpush_req_raw(endpoint_t *ep, xce_peerinfo_t *from,
capn_write_mem(&c, (uint8_t *)pkt->data, pkt->sz, 0);
capn_free(&c);
endpoint_enq(ep, &(pkt->link));
return 0;
int enq_rc = endpoint_enq(ep, &(pkt->link));
return (enq_rc < 0) ? enq_rc : 0;
}
/* wal_entry_to_wire: fill a wire WalCatchupEntry from a C entry's header
@ -559,8 +559,8 @@ int xce_wal_batch_req_raw(endpoint_t *ep, wal_catchup_entry_t **entries,
return rc;
}
endpoint_enq(ep, &(pkt->link));
return 0;
int enq_rc = endpoint_enq(ep, &(pkt->link));
return (enq_rc < 0) ? enq_rc : 0;
}
/*
@ -644,8 +644,8 @@ int xce_snapshot_chunk_req_raw(endpoint_t *ep, const snapshot_transfer_t *chunk,
return rc;
}
endpoint_enq(ep, &(pkt->link));
return 0;
int enq_rc = endpoint_enq(ep, &(pkt->link));
return (enq_rc < 0) ? enq_rc : 0;
}
/*
@ -740,8 +740,8 @@ int xce_replconfig_reply_raw(endpoint_t *ep, xce_peerinfo_t *from,
capn_write_mem(&c, (uint8_t *)pkt->data, pkt->sz, 0);
capn_free(&c);
endpoint_enq(ep, &(pkt->link));
return 0;
int enq_rc = endpoint_enq(ep, &(pkt->link));
return (enq_rc < 0) ? enq_rc : 0;
}
/*