Allocation rebalance is gated on isSynching() instead of being suppressed during sync
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- distributed-systems, docker, java
- Domain
- distributed-systems
Research direction
Start with the autoAssignAllocation() condition in distributed/src/main/java/com/orientechnologies/orient/distributed/db/OrientDBDistributed.java near line 339, and isSynching() in ODatabaseTopologyState.java around lines 531-532. Confirm the guard requires isSynching to be true, then negate it so rebalance runs only when no sync session is active. Done when a unit test fixes isQuorumOnline and isOnline and asserts autoAssignAllocations(true) for both isSynching values.
Written by the indexing model from the issue text.
Description
OrientDB Version: 3.2.55 (build 5a42e4f47183a1db1fa00186bd817dda57e24eeb)
Java Version: OpenJDK 1.8.0_492 (jdk8u492-b09)
OS: Linux x86_64 (official orientdb:latest image, Docker)
Expected behavior
OrientDBDistributed.autoAssignAllocation() should rebalance allocations when the cluster is online and stable (no active sync session), and suppress rebalance while a sync session is active.
Concretely, with isQuorumOnline = true and the local node online:
isSynching() == false→ rebalance should run (autoAssignAllocations(true)).isSynching() == true→ rebalance should be skipped.
Actual behavior
The condition is inverted: it requires databaseTopology.isSynching(dbId) to be true to run the rebalance:
if (isQuorumOnline && isOnline && databaseTopology.isSynching(dbId)) {
autoAssignAllocations(true);
}
isSynching() returns !this.syncSessions.isEmpty(), i.e. it is true when a sync session is active. So a stable cluster never rebalances, while a sync window does — the opposite of the intended "avoid rebalance during sync" behavior.
Steps to reproduce
This is a source-level truth-table oracle of the current condition (the container is used for a clean start, version/liveness and a control query).
- Read
OrientDBDistributed.autoAssignAllocation()andODatabaseTopologyState.isSynching()from the current source. - Evaluate the branch under two bounded states:
steady_state_no_sync: isQuorumOnline=true, isOnline=true, isSynching=false
expected autoAssign=true, actual autoAssign=false
active_sync_session: isQuorumOnline=true, isOnline=true, isSynching=true
expected autoAssign=false, actual autoAssign=true
- Control:
SELECT 1 AS valuereturns{"result":[{"value":1}]}, and the container stays alive.
Observed: source_probe.json reports expected_autoAssign opposite to actual_autoAssign in both states.
Additional context
distributed/src/main/java/com/orientechnologies/orient/distributed/db/OrientDBDistributed.java:339/:343— theautoAssignAllocation()condition isisQuorumOnline && isOnline && isSynchingdistributed/src/main/java/com/orientechnologies/orient/distributed/context/coordination/dbs/ODatabaseTopologyState.java:531-532—isSynching()returns!this.syncSessions.isEmpty()- The change that introduced this gate is titled
fix: avoid to rebalance allocation if sync is happening(git show 894d3f878d), but it added a positiveisSynching()requirement instead of a negative guard.
Suggested fix: negate the condition (&& !databaseTopology.isSynching(dbId)) or restructure the guard to skip rebalance when a sync session exists. Add a unit test that fixes isQuorumOnline/isOnline and asserts the branch for both isSynching values.
Scope note: no multi-node sync topology was built; the defect is confirmed by the current-source truth table and a bounded control query. The runtime is 3.2.55 and the source is the current develop.
- Dominant language
- Java
- Stars
- 5k
- Forks
- 871
- Avg merge
- 20h 9m
- Merged PRs (30d)
- 31
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from orientechnologies/orientdb
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
orientechnologies/orientdb#11020 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
orientechnologies/orientdb#11015 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
orientechnologies/orientdb#11013 ·
Maintainers usually reply within 1 day
-
Finalized promises remain in promisedById, so isPromised() keeps returning true and the map leaksOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
orientechnologies/orientdb#11012 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
orientechnologies/orientdb#11011 ·
Maintainers usually reply within 1 day
All issues in orientechnologies/orientdb
Similar issues
-
hermes-queue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
chrisalunlloyd2-sudo/mindpalace#425 ·
Maintainers usually reply within 1 day
-
documentation enhancement first-time-contributor good first issue
Difficulty 1/5 Under an hour Newbie friendliness 84/100
SasanLabs/VulnerableApp#961 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
symgraph/GhidrAssistMCP#84 ·
Maintainers usually reply within 2 days
-
waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
micrometer-metrics/micrometer#8232 ·
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 1/5 Under an hour Newbie friendliness 78/100
2025sl93031-ShubhamSain/SustainRank-ESG-Intelligence-Platform#57 ·
Maintainers usually reply within 1 day