forked from lei.chen/myxce
feat: wire persist_init/recover/start/stop into cluster lifecycle (P0-F)
- Add `persist_t persist` field to cluster_t (cluster_def.h includes persist.h) - Add `workdir` and `name` fields to myconf_t; main.c passes them through - cluster_init: call persist_set_workdir, persist_init, persist_recover after apiserver_init - cluster_start: call persist_start (launches fsync thread + registers WAL hooks) - cluster_fini: call persist_stop + persist_fini before delaymgr/vtaskmgr teardown - persist_init: store cluster back-pointer (replaces (void)c stub) - persist_start: register persist_job/queue/worker_hook_fun via xce_add_hook when cluster != NULL - Add test_cluster_persist.c: compile-time struct check + config defaults + workdir path derivation - Register test in controller_test.c and meson.build All controller tests pass (1/1 OK, 50s).
This commit is contained in:
parent
3030012f51
commit
b52fbef36d
9 changed files with 159 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ extern void test_persist_recovery(void);
|
|||
extern void test_hooks(void);
|
||||
extern void test_persist_hooks(void);
|
||||
extern void test_gc_retention(void);
|
||||
extern void test_cluster_persist(void);
|
||||
|
||||
void setUp(void) { return; }
|
||||
|
||||
|
|
@ -95,6 +96,7 @@ int main(int argc, char* argv[])
|
|||
TEST(test_hooks);
|
||||
TEST(test_persist_hooks);
|
||||
TEST(test_gc_retention);
|
||||
TEST(test_cluster_persist);
|
||||
|
||||
return UNITY_END();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue