feat(libxce-failover): best-effort single-shot reconnect for fire-and-forget ops (notify/heartbeat/nop) (task 5.2)
This commit is contained in:
parent
4345974b54
commit
fdb8938059
5 changed files with 210 additions and 4 deletions
|
|
@ -211,7 +211,10 @@ int xcecli_nop(xcecli_ctx_t c)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
return xce_nop(&(ctx->ctx));
|
||||
/* Fire-and-forget: best-effort transport reconnect on a known-dead
|
||||
* connection, then a single-shot send. No status classification, no
|
||||
* no-primary backoff, no retry budget (task 5.2). */
|
||||
return XCECLI_FF_CALL(ctx, xce_nop(&(ctx->ctx)));
|
||||
}
|
||||
|
||||
int xcecli_heartbeat(xcecli_ctx_t c, int hb_interval)
|
||||
|
|
@ -222,7 +225,10 @@ int xcecli_heartbeat(xcecli_ctx_t c, int hb_interval)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
return xce_heartbeat(&(ctx->ctx), hb_interval);
|
||||
/* Fire-and-forget: best-effort transport reconnect on a known-dead
|
||||
* connection, then a single-shot send (task 5.2). A heartbeat must NEVER go
|
||||
* through the no-primary backoff retry budget. */
|
||||
return XCECLI_FF_CALL(ctx, xce_heartbeat(&(ctx->ctx), hb_interval));
|
||||
}
|
||||
|
||||
int xcecli_shutdown(xcecli_ctx_t c)
|
||||
|
|
@ -403,7 +409,12 @@ int xcecli_notify(xcecli_ctx_t c, xce_notify_data_t* data)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
return xce_notify(&(ctx->ctx), data);
|
||||
/* Fire-and-forget chokepoint: every thin notify_* wrapper delegates
|
||||
* here, so applying the best-effort reconnect at this single point covers
|
||||
* them all without double-wrapping/double-locking. Best-effort transport
|
||||
* reconnect on a known-dead connection, then a single-shot send (task
|
||||
* 5.2). */
|
||||
return XCECLI_FF_CALL(ctx, xce_notify(&(ctx->ctx), data));
|
||||
}
|
||||
|
||||
int xcecli_notify_jobstart(xcecli_ctx_t c, job_pidinfo_t* pidinfo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue