fix(controller): a queue added by a live config upgrade exists without a restart (bug-1469)
build_queues() only ran at boot, so a queue a live config upgrade added
had no runtime object in c->qmgr (and the scheduler/apiserver never heard
of it) until the controller restarted. The checkpoint-ordering half of
bug-1469 was fixed in 959b0cda; this is the remaining half.
- reconcile_config_queues(c, notify): creates every queue in the active
config that has no runtime object, leaves existing ones untouched,
returns the number created.
- config_activate_committed() calls it (with notify) after every
successful activation -- verified-marker and no-marker paths alike.
- persist_notify_queue_updated_no_wal(): fires HOOK_DETAIL_QUEUE_UPDATE
under the t_apply_seam_notifying guard, so the scheduler/apiserver are
told while no WAL_QUEUE_CTRL is appended -- config queues are
config-owned, built on every member from the committed config.
- build_queues() now delegates to it without notify, so boot and
activation are idempotent in either order.
New test_config_queue_reconcile.c (RED before: the added queue was never
created): creates the added queue, leaves the existing object untouched,
notifies once, and a second reconcile/build_queues adds nothing.
Controller suite passes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c3a17b19ab
commit
154a169ff3
8 changed files with 183 additions and 5 deletions
|
|
@ -1578,6 +1578,13 @@ void persist_notify_job_updated_already_persisted(cluster_t* c, job_t* j);
|
|||
* them until some unrelated worker event happens to re-fire the hook. */
|
||||
void persist_notify_worker_status_updated(cluster_t* c, worker_t* w);
|
||||
|
||||
/* bug-1469: fire HOOK_DETAIL_QUEUE_UPDATE AFTER_EVENT for `q` under the same
|
||||
* t_apply_seam_notifying guard, so the scheduler/apiserver learn about a
|
||||
* queue created by config activation while persist_queue_hook_fun appends
|
||||
* no WAL_QUEUE_CTRL fact -- config queues are config-owned and built on
|
||||
* every member from the committed config, never replayed from WAL. */
|
||||
void persist_notify_queue_updated_no_wal(cluster_t* c, queue_t* q);
|
||||
|
||||
int persist_worker_hook_fun(int type, int situation, int detail,
|
||||
void* cls, va_list ap);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue