How long a replica retries a change its backend could not apply, and how long it waits between
attempts, is decided by constants in LDAPReplicationDomain. An operator whose maintenance windows
are longer than the built-in budget cannot raise it, and the only way to exercise the policy in a
test is a public setter on a production singleton.
Today
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
| constant |
value |
what it decides |
IN_PLACE_REPLAY_ATTEMPTS |
10 |
how many times a replay is retried before the session is restarted |
REPLAY_GIVE_UP_DELAY_IN_MS |
5 min |
how long a change is retried before the replica gives up on it and diverges |
REPLAY_RETRY_DELAY_IN_MS |
1 s |
the backoff, multiplied by the number of restarts in a row |
MAX_REPLAY_RETRY_DELAY_IN_MS |
10 s |
the longest the session is left down |
MAX_FAILED_REPLAY_ATTEMPTS_TRACKED |
1000 |
how many failing changes are remembered |
Giving up means recording a change which was never applied as replayed: the replica diverges, raises
the org.opends.server.replication.UnreplayedChange alert and has to be reinitialized. Five minutes
is a reasonable default, but an import-ldif or a rebuild-index on a large backend outlasts it, and
the administrator who knows that has no way to say so.
What it would look like
The domain already carries this kind of knob in ReplicationDomainCfg - replay-thread-number,
heartbeat-interval, changetime-heartbeat-interval, assured-timeout - so the natural shape is a
property next to them, in
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ReplicationDomainConfiguration.xml,
with the admin guide entry which comes with it. changeConfig() already re-reads that configuration
when it changes.
At least replay-give-up-delay is worth exposing; the backoff and the in-place attempt count could
stay as they are, or follow it.
Why this is separate
Doing it well means a generated configuration property, its documentation, and a decision about which
of the five knobs deserve to be public. #892 introduced the budget as a constant with a
@VisibleForTesting setter (setReplayGiveUpDelay()), which the tests use because they cannot wait
five minutes. A real property would remove that setter, remove the constant the test duplicates, and
answer the operator question at the same time.
Raised from the review of #892.
How long a replica retries a change its backend could not apply, and how long it waits between
attempts, is decided by constants in
LDAPReplicationDomain. An operator whose maintenance windowsare longer than the built-in budget cannot raise it, and the only way to exercise the policy in a
test is a public setter on a production singleton.
Today
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.javaIN_PLACE_REPLAY_ATTEMPTSREPLAY_GIVE_UP_DELAY_IN_MSREPLAY_RETRY_DELAY_IN_MSMAX_REPLAY_RETRY_DELAY_IN_MSMAX_FAILED_REPLAY_ATTEMPTS_TRACKEDGiving up means recording a change which was never applied as replayed: the replica diverges, raises
the
org.opends.server.replication.UnreplayedChangealert and has to be reinitialized. Five minutesis a reasonable default, but an
import-ldifor arebuild-indexon a large backend outlasts it, andthe administrator who knows that has no way to say so.
What it would look like
The domain already carries this kind of knob in
ReplicationDomainCfg-replay-thread-number,heartbeat-interval,changetime-heartbeat-interval,assured-timeout- so the natural shape is aproperty next to them, in
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ReplicationDomainConfiguration.xml,with the admin guide entry which comes with it.
changeConfig()already re-reads that configurationwhen it changes.
At least
replay-give-up-delayis worth exposing; the backoff and the in-place attempt count couldstay as they are, or follow it.
Why this is separate
Doing it well means a generated configuration property, its documentation, and a decision about which
of the five knobs deserve to be public. #892 introduced the budget as a constant with a
@VisibleForTestingsetter (setReplayGiveUpDelay()), which the tests use because they cannot waitfive minutes. A real property would remove that setter, remove the constant the test duplicates, and
answer the operator question at the same time.
Raised from the review of #892.