Skip replication processing when no replication domain is configured#681
Open
vharseko wants to merge 1 commit into
Open
Skip replication processing when no replication domain is configured#681vharseko wants to merge 1 commit into
vharseko wants to merge 1 commit into
Conversation
The Multimaster Synchronization provider is enabled by default even on standalone servers with no replication domain configured, and its three per-operation hooks (conflict resolution, pre-operation, post-operation) each called findDomain(), which iterated the request controls and walked the entry DN up to the suffix querying an empty domains map, allocating a fresh result object every time. Return null from findDomain() before the DN walk when no domains are registered (repair-control processing is preserved), and reuse a shared stateless ContinueProcessing result instead of allocating one per hook invocation. An interleaved A/B under concurrent modify load shows no measurable throughput change on an 8-core host — the write path is dominated by the JE write-ahead log — so this is a cleanliness fix: it removes pointless per-write work from every non-replicated deployment rather than a measured win.
maximthomas
approved these changes
Jul 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Found while profiling the MODIFY hot path with the series methodology
(#660, #667–#670, #672, #674, #678–#680). The Multimaster Synchronization
provider is enabled by default even on standalone servers with no
replication domain configured (
config.ldif:cn=Multimaster Synchronizationhasds-cfg-enabled: truewith an emptycn=domains),and its three per-operation hooks — conflict resolution, pre-operation and
post-operation — each call
findDomain(), which:domainsmap at every level via
BackendConfigManager.getParentDNInSuffix,SynchronizationProviderResult.ContinueProcessing.That is three DN walks and three result allocations per write operation
that can never find anything on a non-replicated deployment.
Change
findDomain()returnsnullbefore the DN walk when no domains areregistered. The repair-control processing above the walk is preserved
(its side effects — flagging the operation and removing the control —
stay identical).
ContinueProcessingresult is allocated once and shared(11 allocation sites in the class); the replicated code paths are
unchanged.
Honest performance note
An interleaved A/B (old→new→new→old→old→new,
modrate, 200 persistentconnections replacing
descriptionon random users, same harness as therest of the series) shows no measurable throughput difference — the
pairs land at −13%/+4.6%/−4.3%, within the noise of the shared 8-core
host. Profiling shows the concurrent write path is dominated by the JE
write-ahead-log serialization (
LogManager.serialLog: ~50 s of monitorblocking per 80 s window), which dwarfs the work removed here. This PR is
therefore a cleanliness fix — removing pointless per-write work from
every non-replicated deployment — not a claimed performance win.
Testing
mvn -P precommit -pl opendj-server-legacy verify(with theslowgroupenabled to include the replication suites):
ModifyOperationTestCase(933),
AddOperationTestCase(138),DeleteOperationTestCase(195),TestModifyDNOperation(69),DependencyTest(3),GenerationIdTest(4) — all pass;
UpdateOperationTestshows only its two pre-existingfailures (
modifyConflicts,namingConflicts), which fail identically onunmodified master (see the slow-suite audit; candidate for a separate
issue). 1,350 tests total, 2 pre-existing failures, 0 new.
Files
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/MultimasterReplication.java