Repository navigation
Description
(all line numbers on master, d07bb31)
Describe the bug
Nine properties of the JE and PDB backends are neither applied to a running backend nor marked as requiring a
restart, so dsconfig reports a change of them applied and the backend runs on unchanged until it is next
opened.
JEStorage.applyConfigurationChange (JEStorage.java:1282-1327) handles db-directory and
db-directory-permissions, re-registers the disk monitor for disk-low-threshold / disk-full-threshold,
and ends in config = cfg. The EnvironmentConfig the environment runs with is built once, in
buildConfiguration (:740-772), and never touched again: nothing calls Environment.setMutableConfig
anywhere in the server. Every other JE property therefore takes effect at the next open of the
environment - and of these, the following are not marked requires-admin-action in
JEBackendConfiguration.xml, so nothing tells the operator so:
| property | JE parameter | mutable in JE |
|---|---|---|
db-cleaner-min-utilization |
je.cleaner.minUtilization |
yes |
db-run-cleaner |
je.env.runCleaner |
yes |
db-evictor-core-threads |
je.evictor.coreThreads |
yes |
db-evictor-max-threads |
je.evictor.maxThreads |
yes |
db-evictor-keep-alive |
je.evictor.keepAlive |
yes |
db-num-cleaner-threads |
je.cleaner.threads |
yes |
db-txn-no-sync / db-txn-write-no-sync |
durability | yes (setDurability) |
(db-cache-size and db-cache-percent are the same shape, with a memory quota drift on top; they are #1063.)
PDBStorage.applyConfigurationChange (PDBStorage.java:1552-1596) does apply db-txn-no-sync live
(commitPolicy = ...), but db-checkpointer-wakeup-interval is set on the PersistIt configuration at open
alone (:1078) and is not marked either.
Where it comes from
Before the pluggable backends, the JE local-db backend applied every change through
RootContainer.applyConfigurationChange: it re-parsed the configuration with
ConfigurableEnvironment.parseConfigEntry, called env.setMutableConfig(newEnvConfig) for the mutable
parameters, and for each non-mutable one whose value changed set adminActionRequired and added
NOTE_JEB_CONFIG_ATTR_REQUIRES_RESTART. OPENDJ-1719 (2015-10) did not carry that block into JEStorage,
and OPENDJ-2337 (8196da2, 2015-11) removed the old backend together with the message. The XML kept the
properties as live ones, which they had been.
Expected behavior
Either shape, per property: the change is applied to the running environment (Environment.setMutableConfig
with the parameters JE accepts as mutable, which is all of the JE rows above), or the property is marked
requires-admin-action / component-restart and the change result says so - as db-evictor-lru-only,
db-log-file-max and the other restart-only JE properties already do.
Suggested fix
Restore the shape of the old RootContainer.applyConfigurationChange in JEStorage: build the new
EnvironmentConfig from the new configuration, hand its mutable part to env.setMutableConfig, and report
the non-mutable differences as needing a restart. For PDB, db-checkpointer-wakeup-interval has no runtime
setter in PersistIt (Persistit.setConfiguration refuses once a configuration is set), so it is a
component-restart in PDBBackendConfiguration.xml plus the note in applyConfigurationChange.
A test per storage: open a storage over a mocked ServerContext, change one mutable property through
applyConfigurationChange, and read it back from env.getMutableConfig() (JE) - JEStorageTest and
PDBStorageTest have the fixture.
Confirmed
(2026-09-17, direct TestNG against the classes of master, of the head of #999 and of the head of #1066, a
storage over a mocked ServerContext; every row is the same on all three)
| change while open | the environment / database runs with | change result |
|---|---|---|
JE db-cleaner-min-utilization 50 → 60 |
50 | success, no admin action, no message |
JE db-run-cleaner true → false |
true | the same |
JE db-evictor-core-threads / -max-threads / -keep-alive 1 / 10 / 600 s → 2 / 4 / 120 s |
1 / 10 / 600 s | the same |
JE db-num-cleaner-threads 2 → 3 |
2 | the same |
JE db-txn-no-sync false → true |
unchanged durability | the same |
JE je-property je.cleaner.minAge=5 (mutable in JE) |
2 | the same |
JE je-property je.log.iteratorReadSize=16384 (immutable in JE) |
2097152 | the same |
PDB db-checkpointer-wakeup-interval 15 s → 60 s |
15 s | the same |
PDB db-txn-no-sync false → true (control) |
SOFT commit policy | the same - applied, as the description says |
Three things the reading above had wrong or missing:
je-propertyis in the same state, and is not in the table above: a native property changed
through it is neither applied when JE accepts it as mutable nor reported when it does not. Same cause -
nothing parses the JE side of a change - and the oldRootContainer.applyConfigurationChangehandled
both forms.- "the change result says so - as
db-log-file-maxand the other restart-only JE properties already
do" is not true. A property markedrequires-admin-actionin the XML reaches the reference
documentation anddsconfig's property help alone:dsconfigprints nothing about it at set time
(getAdministratorActionis read by the help and the doc generator only), and the change result of such
a property is as empty as the ones above (db-log-file-max100 MB → 200 MB: success, no admin action,
no message). Server-side,adminActionRequiredin a change result becomes a warning in the error log
(ConfigurationHandler.handleConfigChangeResult, message 647) - nothing reaches the client on success.
So the marking was all those properties ever had; the oldRootContainerreported every changed
immutable parameter in the change result, and that is the shape to restore for all of them. - A durability which sets both flags is admitted and written.
db-txn-write-no-syncis on by
default, sodsconfig set-backend-prop --set db-txn-no-sync:trueon a JE backend yields one; nothing
checks it at change time (isConfigurationChangeAcceptabledoes not parse the JE side either), and the
backend fails to open onERR_CONFIG_JEB_DURABILITY_CONFLICTat its next restart. The old
RootContainer.isConfigurationChangeAcceptableranparseConfigEntry; that goes too.
One correction to the history: NOTE_JEB_CONFIG_ATTR_REQUIRES_RESTART survived OPENDJ-2337 (8196da2
still carries it) and was dropped later as unused; the road that used it went with OPENDJ-1719 as said.
On the fix: Environment.setMutableConfig takes of a full EnvironmentConfig exactly the parameters JE
accepts as mutable, so the shape of the old code works as it was - with one exception. je.maxMemory and
je.maxMemoryPercent are mutable too, and handing them over would resize the cache live, against the
restart #1063 asks for so that the cache stays with the memory reserved for it; the change has to hand the
environment its current values of the two back. And JE leaves the durability an environment has in place
when a configuration hands it none (setDurability(null) removes by the wrong key), so a configuration which
sets neither flag has to set COMMIT_SYNC explicitly for a change back to take.
Related
Found while analysing #1063; the cache properties are fixed there, the rest is this issue.
Activity
[OpenIdentityPlatform#1068] Apply what a running backend takes of a c…
[OpenIdentityPlatform#1068] Apply what a running backend takes of a c…
[OpenIdentityPlatform#1068] Apply what a running backend takes of a c…
[OpenIdentityPlatform#1068] Apply what a running backend takes of a c…
[OpenIdentityPlatform#1068] Put a removed native property back to JE'…
[OpenIdentityPlatform#1068] Apply what a running backend takes of a c…
[OpenIdentityPlatform#1068] Put a removed native property back to JE'…
[OpenIdentityPlatform#1068] Name the directory the storage runs on un…
[OpenIdentityPlatform#1068] Apply what a running backend takes of a c…
[OpenIdentityPlatform#1068] Put a removed native property back to JE'…
[OpenIdentityPlatform#1068] Name the directory the storage runs on un…
[OpenIdentityPlatform#1068] Ask for a restart for an off-heap cache s…
[#1068] Apply what a running backend takes of a configuration change,…