You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ContextConfiguration runs a SCOPE.SERVER setting's callback but not a SCOPE.DATABASE one, so MAX_PAGE_RAM / DATE_IMPLEMENTATION written per database are stored and never applied #7163
Follow-up to #7121, raised in review of PR #7161. Pre-existing, not a regression from that PR.
Summary
PR #7161 gave ContextConfiguration a hook that runs a declared setting's callback on every write path it owns (fromJSON, both setValue overloads), because a SCOPE.SERVER setting is authoritative in the server's overlay and the overlay never writes through to the GlobalConfiguration enum. That fixed arcadedb.server.logFormat.
The hook is deliberately scoped to SCOPE.SERVER. The same shape exists for the SCOPE.DATABASE settings whose callback does real work:
MAX_PAGE_RAM - clamps the configured heap fraction and logs a warning when it is out of range
DATE_IMPLEMENTATION / DATE_TIME_IMPLEMENTATION - convert a String class name to a Class via Class.forName. coerce() has no Class.class case, so it does not perform that conversion either
A value written into a per-database ContextConfiguration for one of these stores the raw, un-normalised value and never runs the callback: the same "stored but never applied" defect #7121 catalogued, one scope over.
Why it is not biting today
AlterDatabaseStatement special-cases DATE_IMPLEMENTATION/DATE_TIME_IMPLEMENTATION itself - it calls Class.forName and getSerializer().setDateImplementation(...) directly, bypassing the callback - so that path happens to work. That is the same per-call-site special-casing PR #7161 removed for the server settings, kept alive here by hand.
MAX_PAGE_RAM has no such special case, so ALTER DATABASE \arcadedb.maxPageRAM` ...` stores a value the clamp never sees.
Suggested fix
Widen GlobalConfiguration.applyContextValue() from scope == SCOPE.SERVER to any scope, then audit the three callbacks above for the contract that entry point already documents: a callback reached through the overlay must be a pure side effect and return its argument unchanged, with any normalisation moved into coerce(). For DATE_IMPLEMENTATION that means teaching coerce() the Class case, which would also let AlterDatabaseStatement drop its own special case and go through the same path as everything else.
Worth doing as one change rather than piecemeal: the value of the hook is that the next setting needing a side effect gets every channel by declaring a callback, and a scope-dependent hook only half delivers that.
A few settings do something when you set them, rather than just holding a value. Set per database with ALTER DATABASE, those were stored but never applied: arcadedb.maxPageRAM kept a page-cache size larger than the heap can take instead of being clamped down, and arcadedb.dateImplementation kept a raw class name that was never resolved.
They are applied now, whichever way you set them. ALTER DATABASE also reports the value that actually took effect, which for an out-of-range maxPageRAM is the clamped one rather than the number you sent.
One behaviour change:ALTER DATABASE now refuses a setting that is not database-scoped, naming the scope in the error. Server settings go through SET SERVER SETTING instead. Previously such a value was accepted and stored in the database configuration where nothing would ever read it back - and, with the fix above, a server-wide setting could have been changed from a database-level permission.
❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
Activity
fix(#7160,#7177,#7163): one tested warning throttle, no redundant ver…
fix(#7160,#7163): publish the warning throttle's state across threads…
fix(#7163): ALTER DATABASE alters DATABASE settings, and every writer…
chore(#7163): import order, and the typed setValue overload where the…
test(#7163): restore the setting the maxPageRAM case overwrote, the w…
fix(#7163): one spelling for a Class-typed setting on every surface t…
fix(#7163): narrow the Class coercion catch, and correct a reset() co…
Merge pull request #7276 from ArcadeData/issue-7160-7159-7163-7177
lvca commentedon Sep 8, 2026
Fixed in 26.10.1 (PR #7276).
A few settings do something when you set them, rather than just holding a value. Set per database with
ALTER DATABASE, those were stored but never applied:arcadedb.maxPageRAMkept a page-cache size larger than the heap can take instead of being clamped down, andarcadedb.dateImplementationkept a raw class name that was never resolved.They are applied now, whichever way you set them.
ALTER DATABASEalso reports the value that actually took effect, which for an out-of-rangemaxPageRAMis the clamped one rather than the number you sent.One behaviour change:
ALTER DATABASEnow refuses a setting that is not database-scoped, naming the scope in the error. Server settings go throughSET SERVER SETTINGinstead. Previously such a value was accepted and stored in the database configuration where nothing would ever read it back - and, with the fix above, a server-wide setting could have been changed from a database-level permission.❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
Merge branch 'main' into issue-7233-7262-7247-config-and-causes
fix(ArcadeData#7160,ArcadeData#7159,ArcadeData#7163,ArcadeData#7177):…