Follow-up to #4297 (GH-3959).
The load_factor node advertisement is PostgreSQL-only. Every other message store's INodeAgentPersistence neither writes nor reads it, so a node on those stores always advertises null.
That is safe by construction — a node advertising no load is treated as having headroom, which is today's behavior — but it means CapacityAwareAssignment = true is a no-op on SQL Server, Oracle, MySQL, RavenDB, Cosmos DB and EF Core, with nothing at startup to say so.
Two pieces of work:
-
Per-store advertisement. Add the column and the read/write for each RDBMS store (the Postgres implementation gates the column and every statement naming it on the flag, so an un-migrated database is never asked for it — worth keeping that shape). The document stores need their own answer since WolverineNode is persisted whole there.
-
Say something when the store can't advertise. Turning the flag on against a store with no load persistence should log a warning at bootstrap rather than silently doing nothing. Related: a node that advertises null is currently treated as both having unlimited headroom and sorting into the lowest load band, which makes it the cluster's preferred placement target — see the sibling issue on that.
DatabaseConstants.LoadFactor is deliberately outside NodeColumns today because every store's readNode is a positional read over that shared list. Adding stores means either extending that carefully or keeping the by-name resolution the Postgres reader uses.
Follow-up to #4297 (GH-3959).
The
load_factornode advertisement is PostgreSQL-only. Every other message store'sINodeAgentPersistenceneither writes nor reads it, so a node on those stores always advertisesnull.That is safe by construction — a node advertising no load is treated as having headroom, which is today's behavior — but it means
CapacityAwareAssignment = trueis a no-op on SQL Server, Oracle, MySQL, RavenDB, Cosmos DB and EF Core, with nothing at startup to say so.Two pieces of work:
Per-store advertisement. Add the column and the read/write for each RDBMS store (the Postgres implementation gates the column and every statement naming it on the flag, so an un-migrated database is never asked for it — worth keeping that shape). The document stores need their own answer since
WolverineNodeis persisted whole there.Say something when the store can't advertise. Turning the flag on against a store with no load persistence should log a warning at bootstrap rather than silently doing nothing. Related: a node that advertises
nullis currently treated as both having unlimited headroom and sorting into the lowest load band, which makes it the cluster's preferred placement target — see the sibling issue on that.DatabaseConstants.LoadFactoris deliberately outsideNodeColumnstoday because every store'sreadNodeis a positional read over that shared list. Adding stores means either extending that carefully or keeping the by-name resolution the Postgres reader uses.