forked from lei.chen/myxce
Merge branch 'working' into job_peek_lchen
job_peek_lchen: Add fetchfile feature (job output/error peek proxy) working: HA/Raft infrastructure (consensus, replication, config mgmt) Conflict resolution summary: - controller.capnp: fetchfile @41, fetchfilereply @18, fetchfilemsg @30 - cluster.c: bifurcated OPCode_reply for fetchfile + config-push ACK - job.c: kept full fetchfile pending-request subsystem (~183 lines) - request.c: kept both xce_fetchfile_req() and XCE_RETRY_DEFAULTS - helper.c: added missing preVoteRequest/preVoteReply mappings - All 15 new test registrations (test_cbuf.c + 14 HA tests)
This commit is contained in:
commit
3a2094a461
529 changed files with 345174 additions and 5048 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "config.h"
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "hook.h"
|
||||
|
|
@ -22,6 +23,10 @@
|
|||
typedef int (*collect_check_fn_t)(void*);
|
||||
|
||||
extern int check_controller(void*);
|
||||
extern int cluster_init_phase1(cluster_t*);
|
||||
extern int cluster_open_listener(cluster_t*);
|
||||
extern int cluster_register_listener(cluster_t*);
|
||||
extern int cluster_init_phase2(cluster_t*);
|
||||
extern int cluster_init(cluster_t*);
|
||||
extern int cluster_start(cluster_t*);
|
||||
extern int cluster_run(cluster_t*);
|
||||
|
|
@ -39,6 +44,7 @@ extern int add_resource(void*, char*, char*, int, xce_order_t, int, int);
|
|||
extern int update_resvals(cluster_t*, worker_t*, int, xce_resval_t*);
|
||||
|
||||
extern int load_jobs(void*);
|
||||
extern int restore_job(cluster_t*, uint64_t, const void*, size_t, uint64_t);
|
||||
extern int update_job(void*, uint64_t, xce_kv_list_t*);
|
||||
extern int do_job_started(void*, uint64_t, int, int*, int, int*);
|
||||
|
||||
|
|
@ -73,11 +79,32 @@ extern int mark_worker_back(cluster_t*, worker_t*);
|
|||
extern int handle_scheduler_leave(cluster_t*);
|
||||
extern int handle_clusterconf(cluster_t*, endpoint_t*, xce_request_t*);
|
||||
|
||||
/* controller-status spec (task 2.1): read-only status query.
|
||||
* ctrlstatus_fill snapshots local HA/config state into *st (no I/O, no state
|
||||
* mutation); ctrlstatus_free_fields releases what fill allocated (the peer
|
||||
* pointer array). handle_ctrlstatus is the dispatch entry point that fills,
|
||||
* replies via xce_reply, then frees. */
|
||||
extern void ctrlstatus_fill(cluster_t*, xce_ctrlstatus_t*);
|
||||
extern void ctrlstatus_free_fields(xce_ctrlstatus_t*);
|
||||
extern int handle_ctrlstatus(cluster_t*, endpoint_t*, xce_request_t*);
|
||||
|
||||
extern void collect_confvars(cluster_t*, collect_check_fn_t, xlist_t*);
|
||||
extern void collect_queues(cluster_t*, collect_check_fn_t, xlist_t*);
|
||||
extern void collect_resources(cluster_t*, collect_check_fn_t, xlist_t*);
|
||||
extern void collect_jobs(cluster_t*, collect_check_fn_t, xlist_t*);
|
||||
extern void collect_workers(cluster_t*, collect_check_fn_t, xlist_t*);
|
||||
|
||||
/* ha-convergence-recovery (3.1-3.3): commit-watermark egress gate for
|
||||
* scheduler-bound job exports. Defined in dataex.c.
|
||||
* job_submit_committed — true iff the job's submit entry is committed
|
||||
* (submit_lsn == 0 || submit_lsn <= committed_lsn);
|
||||
* one lock-free atomic load + compare.
|
||||
* collect_jobs_committed — identical contract to collect_jobs, additionally
|
||||
* excluding jobs whose submit entry is uncommitted.
|
||||
* For scheduler-bound callers ONLY; status/API read
|
||||
* paths keep plain collect_jobs (Req 3.4). */
|
||||
extern bool job_submit_committed(cluster_t*, job_t*);
|
||||
extern void collect_jobs_committed(cluster_t*, collect_check_fn_t, xlist_t*);
|
||||
extern int get_queue_exec(cluster_t*, char*, char**, char**);
|
||||
extern void unlock_collect_queues(xlist_t*);
|
||||
extern void unlock_collect_jobs(xlist_t*);
|
||||
|
|
@ -117,7 +144,7 @@ extern int on_task_finish(cluster_t*, xce_task_finish_t*);
|
|||
extern int xce_controller_res_init(cluster_t*);
|
||||
extern int map_resource_to_host(char*, cluster_t*);
|
||||
extern int release_resource_from_worker(char*, cluster_t*);
|
||||
extern int collect_resval_with_idx(zarray_t*, xlist_t*);
|
||||
extern int collect_resval(var, zarray_t*, xlist_t*);
|
||||
extern int do_set_preason(cluster_t*, endpoint_t*, xce_request_t*);
|
||||
extern int do_clr_preason(cluster_t*, endpoint_t*, xce_request_t*);
|
||||
extern int on_fetchfile(cluster_t*, endpoint_t*, xce_request_t*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue