chore: baseline snapshot — prior-session work + ha-consistency-invariants spec family
Pre-existing uncommitted work: ha-repl-hardening payload data plane (7.x), heartbeat liveness fix (Req 1.3), connection-reuse ASAN fixes, doc cleanup. New: ha-consistency-invariants umbrella (requirements/design/research) and its four implementation sub-specs (specs generated via batch, cross-spec review applied), steering roadmap + product.md Raft+CP decision.
This commit is contained in:
parent
084244941b
commit
06135954ff
88 changed files with 25611 additions and 5285 deletions
|
|
@ -771,10 +771,25 @@ int sched_update(xce_scheduler_t* sched)
|
|||
int i;
|
||||
for (i = 0; i < req->u.resourceupdate.nresources; i++) {
|
||||
xce_resource_t* r = req->u.resourceupdate.resources[i];
|
||||
if (r == NULL) {
|
||||
continue;
|
||||
if (r == NULL) continue;
|
||||
xce_resource_t* existing = makeResource(sched->resmgr, r);
|
||||
if (existing == NULL) {
|
||||
/* EEXIST: update-in-place on existing resource (add-or-update) */
|
||||
xce_resource_t* found = NULL;
|
||||
if (key_find(sched->resmgr, r->name, (void**)&found) == 0
|
||||
&& found != NULL) {
|
||||
/* Copy mutable integer fields; desc/name are identity,
|
||||
* distributions/hbased_defined are deep-structs. */
|
||||
found->valtype = r->valtype;
|
||||
found->ordtype = r->ordtype;
|
||||
found->flags = r->flags;
|
||||
found->interval = r->interval;
|
||||
WARN("%s updated existing resource %s", __func__, r->name);
|
||||
} else {
|
||||
WARN("%s makeResource failed for %s and lookup not found",
|
||||
__func__, r->name);
|
||||
}
|
||||
}
|
||||
makeResource(sched->resmgr, r);
|
||||
}
|
||||
rc = 0;
|
||||
break;
|
||||
|
|
@ -804,14 +819,16 @@ int sched_update(xce_scheduler_t* sched)
|
|||
for (i = 0; i < resvals->count; i++) {
|
||||
xce_resval_t* rv = resvals->vals[i];
|
||||
xce_sched_worker_t* w = NULL;
|
||||
if (rv == NULL) {
|
||||
continue;
|
||||
}
|
||||
xce_resource_t* r = NULL;
|
||||
if (rv == NULL) continue;
|
||||
w = sched_get_worker(sched, rv->host);
|
||||
if (w == NULL) {
|
||||
if (w == NULL) continue;
|
||||
if (key_find(sched->resmgr, rv->name, (void**)&r) < 0 || r == NULL) {
|
||||
WARN("%s unknown resource %s in per-worker resvals update",
|
||||
__func__, rv->name);
|
||||
continue;
|
||||
}
|
||||
zarray_put(&w->resvals, 0, rv->val);
|
||||
zarray_put(&w->resvals, r->idx, rv->val);
|
||||
}
|
||||
rc = 0;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue