Skip to content

fix(#6297, #6280, #6279, #6270): a teardown that deletes what the test wrote, a warning that speaks again, and bounds that say what they are for - #6307

Merged
lvca merged 8 commits into
mainfrom
issue-6297-6280-6279-6270
Aug 17, 2026
Merged

lvca merged 8 commits into
mainfrom
issue-6297-6280-6279-6270

Conversation

@lvca

@lvca lvca commented Aug 17, 2026

Copy link
Copy Markdown
Member

Closes #6297, closes #6280, closes #6279, closes #6270.

Four follow-ups from #6267 / #6268. They share an origin - all four are about a test that reports coverage it does not have - so they are fixed together.

#6297 (1) The teardown resolved its paths from a configuration it had just reset

BaseGraphServerTest.endTest() called GlobalConfiguration.resetAll() before the cleanup. Every path TestServerHelper.deleteDatabaseFolders() deletes is resolved at call time from SERVER_DATABASE_DIRECTORY, whose default is ${arcadedb.server.rootPath}/databases over a root path that defaults to null, and getValueAsString() substitutes the empty string for an unresolvable variable rather than failing. The prefix collapsed, so the cleanup asked for a recursive delete of /databases, /databases0 ... while the test's own ./target/databases0 - and the .raft-storage under it - survived teardown untouched.

  • The reset moved to the end, inside a finally that now also covers the deletes, so a failing checkDatabasesAreIdentical() no longer skips the cleanup entirely (that is the cross-class disk-state leak the issue suspected behind the DynamicMembershipTest "DB1 5 <> DB2 15").
  • StaticBaseServerTest.beginTest() had the mirror-image bug - it cleaned before setTestConfiguration(), so on the first class in a fork it cleaned /databases0 too. Configuration first now.
  • TestServerHelper.isResolvedTestPath refuses a prefix that did not resolve: blank, or absolute and naming a single root-level folder. A relative path (./target/databasesN) or a deeper absolute one (a @TempDir under the system temp dir) is always allowed. A refusal logs SEVERE and deletes nothing, so a future reordering degrades to a logged no-op instead of a deleteRecursively at /.

Issue6297TeardownDeletesTestFoldersIT asserts in @AfterAll - the only hook JUnit runs after @AfterEach - that ./target/databases0 is gone. Verified it goes red on the old ordering:

[endTest() left the test's own database behind (issue #6297)]
Expecting file: .../server/./target/databases0/graph  not to exist

Issue6297TeardownPathResolutionTest pins the trap itself (a reset configuration resolves to /databases), the guard's accept/refuse set, and both orderings end to end against a @TempDir.

#6297 (2) The warn-once latches never rearmed

Rather than the issue's suggestion (rearm on a committed Raft configuration change), the latch is replaced by the rendered collision list itself. That is strictly better in both directions:

  • a membership change that leaves the verdict identical says nothing new, and now stays quiet - rearming on the event would re-log the same unchanged misconfiguration on every peer add;
  • any change to the verdict is reported, whatever caused it - a different pair colliding, a peer added at runtime onto an address already taken, an HTTP port becoming available late - not only the causes someone remembered to hook.

A clean pass clears the memory instead of reporting, so a misconfiguration that is fixed and later reintroduced is announced again. The line already named every collision it found, which is what makes it usable as the key; warnAmbiguousRouting now names them too, so the routing warning has both a usable key and a usable message. The fallback latches (deriving at all) are deliberately left as booleans - that condition does not change with membership.

Issue6297AmbiguityRearmTest covers the rearm contract and the verdict rendering (stable order whatever order Ratis hands the group over in, declared-beats-derived, clean view renders empty).

#6297 (3) and (4)

Left as tracking entries, deliberately:

#6280 EXPLAIN is no longer the blocker

The TODO said "EXPLAIN integration needs to be added separately". It does not: OpenCypherQueryEngine routes an EXPLAIN prefix and CypherExecutionPlan.explain() describes the count push-down first, precisely because the push-down replaces the whole chain.

EXPLAIN MATCH (a:Account) RETURN COUNT(a) as count
  Using Count Push-Down
  + TYPE COUNT OPTIMIZATION (Account)

EXPLAIN MATCH (a:Account) WHERE a.balance > 5000 RETURN COUNT(a) as count
  Using Cost-Based Query Optimizer
  + NodeByLabelScan(a:Account) [filter: a.balance > 5000]

All six commented-out assertions are restored against it (the two negative ones included), and the alias, empty-type and polymorphic cases get one as well - they had none. EXPLAIN rather than PROFILE on purpose: the negative cases describe the full scan the push-down was refused for, and running one to find out that it ran is the cost the assertion exists to detect.

#6279 The comparison the test claimed to make is no longer true

issue3216_performanceComparisonMatchStrategies asserted duration >= 0 twice, which cannot fail. Its premise had also expired: CypherExecutionPlan.extractIdFilter lifts an ID(x) = <literal|parameter> equality out of the WHERE clause into the MatchNodeStep at plan time - the fix #3216 was closed on - and it applies to the single-MATCH form exactly as it does to the split one. Restoring assertThat(duration2).isLessThan(duration1) would have asserted something false.

Rather than deleting the test, the property it was reaching for is made visible. MatchNodeStep.prettyPrint now names the RID it was given, alongside [index: ] and [filter: ]:

+ MATCH NODE (a) [id: #1:0]
+ MATCH NODE (b) [id: #4:0]
+ FILTER WHERE (ID(a) = $sourceId AND ID(b) = $targetId)

That is a user-facing improvement in its own right - the resolution of #3216 tells users to write the query so the push-down fires, and until now the plan was the one place that would not say whether it had. The test asserts both forms carry the marker, plus a control query (property equality instead of ID()) whose plan does not, so the assertion discriminates rather than being printed unconditionally. Off the benchmark lane, since it no longer times anything.

#6270 The wall-clock and @timeout pass, outside the engine suite

Four elapsed-time bounds in server/network now measure through StallAwareStopwatch, all of them category 1 (a tripwire between a bounded operation and an unbounded one), all assertGaveUpWithin: Issue5470BatchStreamStallIT, Issue5470BatchErrorDeliveryIT, Issue5418ShutdownHookDeadlockTest, RemoteHttpComponentTest.

Two premises in the issue were wrong and are worth recording:

  • HTTPAuthSessionIT needs nothing. Its two sites are elapsedFromCreation() >= 100 (a lower bound, which a stall only makes more true) and a field-presence check. Same for PostBatchHandlerIT, whose elapsedMs >= 0 is a response-field sanity check, not a latency bound.
  • server and network did not already consume the engine test-jar. Neither declares it and neither uses TestHelper. Added at test scope in both poms - no new external dependency; the artifact is already produced by engine/pom.xml.

The @Timeout pass covers every engine annotation at 45 s or under. The conclusion differs from the issue's guess in one place, and the difference matters: RangeFunctionTest's annotations are not the assertion. What each of those methods regresses to is an unbounded loop or a materialised range, and what each one claims is carried by a structural assertion - containsExactly on the returned elements, isInstanceOf(LongRangeList.class) on the lazy one, assertThatThrownBy on the rejected one. None of those can pass while the range is being materialised. So widening the annotation does not weaken the GHSA-xmjm regression test; leaving it at 5 s, three orders of magnitude below the honest budget and well inside the range of the 24 s stalls #6260 was filed on, is what made it a coin flip.

  • Hang detectors, sized clear of the honest budget plus a ~30 s stall: RangeFunctionTest (5 s/10 s -> 60 s), IndexDescOrderDuplicateKeysTest, LongObjectHashMapTest (SEPARATE_THREAD kept - the regression is an infinite probe loop), HashIndexOverflowCycleTest, the two rejection cases in CypherRangeHeapExhaustionTest, and LockManagerFairnessTest, whose stress methods already give themselves up to 45 s (done.await(45, SECONDS)) or 25 s (250 rounds x 100 ms) of honest work and so were sized below their own budget once a stall is added.
  • The two genuine laziness claims - LongRangeListTest.hugeRangeIsFreeOfHeap and CypherRangeHeapExhaustionTest.hugeRangeIsLazyWhenTheLimitIsDisabled - are now asserted with assertStayedUnder on the discounted clock, which is tighter than the annotation it replaces, with the annotation left behind as the hang detector.
  • The server module's four @Timeout(60) in RangeHeapExhaustionHttpStatusIT are already generous against a sub-second honest budget: nothing to do.

Finally, the sampler thread is renamed arcadedb-test-stall-monitor -> test-jvm-stall-monitor, out of the prefix DatabaseLifecycleBackgroundThreadsTest scans for leaked engine threads. It was safe only because that loop skips daemons first; a shutdown path making the sampler non-daemon would have turned a leak detector red pointing at #5418. StallAwareStopwatchTest now pins the name against all three scanned prefixes.

Verification

  • Issue6297TeardownDeletesTestFoldersIT verified red on the pre-fix ordering, green after.
  • Green: engine com.arcadedb.query.opencypher.**, the touched engine utility/index/function classes, ha-raft unit lane, server unit lane, network RemoteHttpComponentTest, server Issue5470BatchErrorDeliveryIT.

…t wrote, a warning that speaks again, and bounds that say what they are for

Four test-hygiene follow-ups from #6267/#6268, fixed together.

#6297 - the teardown resolved its paths from a configuration it had just reset.
BaseGraphServerTest.endTest() called GlobalConfiguration.resetAll() before the
cleanup, and every path TestServerHelper.deleteDatabaseFolders() deletes is
resolved at call time from SERVER_DATABASE_DIRECTORY, whose default is
${arcadedb.server.rootPath}/databases over a root path that defaults to null and
resolves to the empty string. So the cleanup deleted /databases0 while the test's
own ./target/databases0 - and the .raft-storage under it - survived. The reset now
runs last, in a finally that also covers the deletes so a failing
checkDatabasesAreIdentical no longer skips them, and StaticBaseServerTest.beginTest
configures before it cleans for the same reason. A guard in deleteDatabaseFolders
refuses a path that did not resolve (blank, or an absolute one naming a single
root-level folder), so a future reordering degrades to a logged no-op instead of a
recursive delete at the filesystem root.

Also #6297: the ambiguity warnings no longer go permanently quiet. A "log this
once" latch is right until the operator acts on it - they declare the two ports it
named, a different pair collides, and nothing is logged because the latch is spent.
The latches are replaced by the rendered collision list itself, so any change to the
verdict is reported and an unchanged verdict stays quiet whatever the cluster did in
between; a clean pass clears the memory so a reintroduced misconfiguration is
announced again. The routing warning now names the peers that collided, like its
peer-to-peer twin already did.

#6280 - OpenCypherCountOptimizationTest could not see the count push-down regress:
a full type scan returns the same count, just slower. EXPLAIN does route through the
openCypher engine and does describe the push-down, so the six assertions commented
out behind a TODO are restored against it, and the alias, empty-type and polymorphic
cases get one too.

#6279 - issue3216_performanceComparisonMatchStrategies asserted only that two
elapsed times were not negative. Its premise is also obsolete: extractIdFilter lifts
an ID(x) = <literal|parameter> equality into the MatchNodeStep at plan time, which is
what #3216 was closed on, and it applies to the single-MATCH form exactly as to the
split one. MatchNodeStep.prettyPrint now names the RID it was given, so the test
asserts the structural property - neither form scans - with a control query the
push-down cannot serve. Off the benchmark lane, since it no longer times anything.

#6270 - the wall-clock pass done for the engine suite in #6268, applied to server and
network: four bounds separating a bounded operation from an unbounded one now measure
through StallAwareStopwatch. HTTPAuthSessionIT needed nothing - its two sites are a
lower bound and a field-presence check. The @timeout classification pass covers the
~20 engine annotations at 45s or under: all of them are hang detectors whose claim is
carried by a structural assertion, so they are sized clear of an honest budget plus a
stall, except the two laziness claims which are now asserted on the discounted clock
with the annotation left behind them as the hang detector. The stall sampler is also
renamed out of the engine's thread namespace so a leak detector cannot mistake it for
engine machinery.
@lvca lvca self-assigned this Aug 17, 2026
@mergify

mergify Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity

Metric Results
Complexity 4

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@claude

claude Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review

This is a well-scoped, well-documented PR that fixes four real test-hygiene bugs (#6297, #6280, #6279, #6270). I read the full diff and cross-checked the touched production code (RaftHAServer.java, MatchNodeStep.java, TestServerHelper.java, BaseGraphServerTest.java) against the rest of each file rather than just the patch context. Overall the logic is sound and the regression tests are strong - each fix ships with a test that is shown to fail on the old behavior.

Correctness

  • TestServerHelper.isResolvedTestPath / deleteResolvedFolder - the refusal-guard logic is correct: relative paths always pass, absolute paths need >1 path element, blank/unparseable paths are refused. Verified against the new Issue6297TeardownPathResolutionTest cases by hand (/databases refused, ./target/databases0/ allowed, @TempDir-based paths allowed). Good defense-in-depth against the exact ordering bug this PR fixes.
  • RaftHAServer ambiguity-verdict rearm (isNewAmbiguityVerdict, describeAmbiguity) - the switch from AtomicBoolean latches to a remembered rendered-verdict string is a clean design: it naturally handles "verdict changed" without needing to hook every membership-change call site, and a clean pass clearing the memory (rather than leaving a stale non-null value) correctly makes a later reintroduced misconfiguration get re-reported. I traced all three call sites (getPeerHttpEndpoints, unambiguousPeerAddress, getRoutingTable) and the field/parameter plumbing is consistent.
  • BaseGraphServerTest.endTest() reordering - moving GlobalConfiguration.resetAll() into the innermost finally so cleanup runs first, and wrapping cleanup itself in a finally so a failing checkDatabasesAreIdentical() no longer skips it, both look correct and match the new Issue6297TeardownDeletesTestFoldersIT (verified red on the old ordering per the PR description).
  • MatchNodeStep.prettyPrint - idFilter/dynamicIdExpression fields exist and are used correctly; the new plan output is a nice, low-risk observability addition on its own merits.

Minor / non-blocking observations

  • Pre-existing redundant cleanup, now more visible. In BaseGraphServerTest.endTest(), the protected instance method deleteDatabaseFolders() (server/src/test/.../BaseGraphServerTest.java:535) already calls TestServerHelper.checkActiveDatabases(...) and TestServerHelper.deleteDatabaseFolders(getServerCount()) internally. The finally block calls that instance method conditionally (if (dropDatabasesAtTheEnd()) deleteDatabaseFolders();) and then unconditionally calls the same two TestServerHelper static methods again immediately after. This double-invocation predates this PR (it previously sat after the whole try/finally, unconditionally), so it isn't a regression introduced here - but since this exact block was touched and reordered, it might have been a good opportunity to collapse the duplication. Not a functional bug (the second pass is effectively a no-op: folders are already gone, active-database list is already empty), just wasted I/O/log noise on every server test teardown.
  • Concurrent ambiguity-verdict updates - isNewAmbiguityVerdict uses getAndSet/set(null) rather than a compareAndSet loop. If two threads race with two different non-empty verdicts, both could observe "changed" and both log - a harmless duplicate warning at worst (same class of race existed with the old AtomicBoolean latch too, just with a different failure shape), but worth a one-line comment if you want to preempt future "why did we log twice" questions.
  • @Timeout values roughly doubled across the board (LockManagerFairnessTest, RangeFunctionTest, etc.) rather than individually tuned per method's own honest budget - reasonable given the PR's stated methodology (honest budget + stall headroom), just flagging that a couple of these (e.g. 30->90s, 60->120s) are fairly generous hang detectors now. The write-up explains the sizing rationale per test class, so this looks intentional.

Test coverage

Strong - every one of the four fixes has a dedicated regression test, and the PR description states the two teardown tests were confirmed red on the pre-fix code. The RaftHAServer package-private describeAmbiguity/claimsByAddress/isNewAmbiguityVerdict are exposed for direct unit testing rather than only indirectly via integration tests, which keeps Issue6297AmbiguityRearmTest fast and deterministic.

Performance / Security

No concerns. All changes are test-only or test-infrastructure except the MatchNodeStep.prettyPrint addition (string building only, on the EXPLAIN/PROFILE path, not hot query execution) and the RaftHAServer warning-path changes (only exercised on ROUTE requests / resync / cluster-verify, not the data path, consistent with the existing Javadoc noting these are non-hot-path).

Note: I wasn't able to run mvn compile/mvn test in this sandbox (tool permissions blocked it), so this review is based on careful manual tracing of the diff against the full source of each touched file rather than an actual build. Worth a real CI run before merge, though nothing here suggests it won't pass given the PR description's stated verification.

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 419 third-party dependencies.
     (CC0 1.0 Universal) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.2 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.6.2 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.6.2 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB MCP Server (com.arcadedb:arcadedb-mcp:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mcp/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)

…dict update is not a CAS loop

Both from the code review on #6307, both non-blocking.

BaseGraphServerTest.endTest() called the instance deleteDatabaseFolders() and then
repeated the two TestServerHelper calls it already ends in - a second recursive walk
of folders that were just removed, on every server test. It was unconditional
because the instance method is not: the folders go whether or not the databases were
dropped. Made that explicit as the else branch instead, which keeps the semantics and
does the work once. The two overrides that exist reach the same calls through super.

RaftHAServer.isNewAmbiguityVerdict uses getAndSet rather than a compareAndSet loop on
purpose: two threads with two DIFFERENT verdicts both logging is a duplicate warning
about a misconfiguration that really did change, and a CAS loop would only pick which
one the operator never hears about.
@claude

claude Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review

This is a well-scoped, well-documented PR: four related test-hygiene fixes, each with a clear root cause, a regression test that was verified red before the fix, and (per the second commit) a prior review round already addressed. I read through the full diff plus the surrounding unchanged context (BaseGraphServerTest, RaftHAServer, MatchNodeStep, TestServerHelper). No blocking issues found; notes below are mostly confirmations plus a couple of minor, non-blocking observations.

Correctness

  • BaseGraphServerTest.endTest() reordering (issue 6297.1): the new try/finally nesting is behavior-preserving on both branches of dropDatabasesAtTheEnd(). When true, the instance deleteDatabaseFolders() still ends in TestServerHelper.checkActiveDatabases(dropDatabasesAtTheEnd()) (i.e. true) + TestServerHelper.deleteDatabaseFolders(getServerCount()), matching the old unconditional tail call. When false, the new else branch calls checkActiveDatabases(false) + deleteDatabaseFolders(getServerCount()) directly, so the walk happens exactly once instead of twice. Moving resetAll() into the outer finally (after cleanup, not before) is exactly what fixes the described bug, and the TEST/SERVER_ROOT_PASSWORD reset still unconditionally runs in the outermost finally, so a failing checkDatabasesAreIdentical() no longer skips cleanup or leaves stale global config. I also checked the two subclasses overriding deleteDatabaseFolders() (BaseRaftHATest, RaftStorageDirectoryIT) - both call super.deleteDatabaseFolders() first, so they compose correctly with the new call site.

  • TestServerHelper.isResolvedTestPath guard: the accept/refuse boundary (blank -> refuse, absolute + single path segment -> refuse, everything else -> accept) matches every case exercised in Issue6297TeardownPathResolutionTest, including the trailing-separator and TempDir cases. One thing worth being aware of: deleteResolvedFolder validates only the prefix argument, not prefix + suffix - for the per-server loop that's databaseDirectory alone, not databaseDirectory + "0". That's fine today since appending a digit/separator never flips a relative path to absolute or changes segment count in a way that changes the verdict, but it's a slightly implicit coupling between the two arguments that a future caller could break without the guard catching it. Not a bug now, just worth a one-line comment if it isn't already implied elsewhere.

  • RaftHAServer ambiguity-verdict rearm (issue 6297.2): isNewAmbiguityVerdict's use of getAndSet instead of a CAS loop is explained in both the method Javadoc and the second commit message - two threads reporting two genuinely different verdicts both logging is the desired behavior, not a bug to fix with compare-and-swap. Traced all four call sites (getPeerHttpEndpoints, unambiguousPeerAddress, and the two warnAmbiguous* methods) and the owners[] array threading is consistent everywhere; describeAmbiguity/isNewAmbiguityVerdict/claimsByAddress are correctly static and package-private, exercised directly by Issue6297AmbiguityRearmTest - a nice way to pin the ordering/stability contract (sorted by address then peer) without needing a live Raft cluster.

  • MatchNodeStep.prettyPrint (issue 6279): idFilter/dynamicIdExpression are genuine existing fields, and the new [id: ...] / [id: per-row] output is additive and doesn't disturb the existing [index: ]/[partition: ]/[filter: ] ordering. OpenCypherMatchEnhancementsTest's rewritten test asserts both the structural marker and, via a control query using a property predicate the push-down can't serve, that the marker doesn't fire unconditionally - a good discriminating test rather than an unconditional print check.

  • OpenCypherCountOptimizationTest.planOf uses EXPLAIN rather than PROFILE, which is the right choice for the negative cases (asserting the optimization was NOT used), since PROFILE would execute the full scan just to prove it ran. Consistent with the existing countEdgesReturnCorrectnessWithDuplicateNames test in the same file that already used a similar plan-string pattern.

Test coverage

Coverage is a strength here - each of the four fixes ships with a test confirmed to fail before the fix (per the PR description), plus:

  • Issue6297TeardownDeletesTestFoldersIT uses @afterall deliberately (the only hook that runs after @AfterEach), a subtle but correct choice.
  • Issue6297AmbiguityRearmTest and the updated Issue6267AmbiguousPeerAddressWarningTest cover the rearm contract, ordering stability, and the declared-beats-derived tie-break directly against the package-private statics, rather than only through the harder-to-drive RaftHAServer integration path.
  • The RangeFunctionTest/LongRangeListTest/CypherRangeHeapExhaustionTest changes correctly separate the hang detector (@timeout, widened) from the actual claim (StallAwareStopwatch.assertStayedUnder), matching the pattern this repo's CLAUDE.md documents for StallAwareStopwatch usage.

Minor / non-blocking

  • Several new comments (MatchNodeStep.prettyPrint, JvmStallMonitor.THREAD_NAME, TestServerHelper.deleteDatabaseFolders) are long narrative blocks. This matches the established style already present elsewhere in this codebase, so I'm not flagging it as inconsistent - just noting it's a lot of prose to keep in sync if the underlying behavior changes again.
  • network/pom.xml and server/pom.xml add arcadedb-engine as a test-scope test-jar dependency. Confirmed engine/pom.xml already builds a test-jar artifact (used by arcadedb-gremlin-it per this repo's build notes), so this doesn't introduce a new external dependency or license concern - it wires existing internal test infrastructure to two more modules, as described.

Performance / security

No concerns. All changes are in test code, test infrastructure, or a plan-printing/logging path (MatchNodeStep.prettyPrint, RaftHAServer warning strings) that isn't on any hot path. The @timeout widenings are explicitly justified as hang detectors rather than latency claims, and the StallAwareStopwatch bounds replacing them are actually tighter than what they replace.

Nice work tracing the /databases0 root-path collapse back to getValueAsString()'s empty-string substitution for an unresolved variable - that's a genuinely subtle bug (silent data-directory collapse to the filesystem root in test teardown), and the fix plus guard rail is proportionate to it.

…ix of it

Second review round on #6307, non-blocking. deleteResolvedFolder validated only the
prefix argument, so the verdict rested on an assumption about the other one - that
appending a digit and a separator can neither make a relative path absolute nor
change its segment count. True today, and a precondition a future caller has no way
to know it must preserve. Checking the concatenation has none. Same verdicts on
every path the callers actually produce, now including the ones the new cases pin:
'/databases0/' still refused, a root path that collapsed to '/' refused for its
replication folder too.
@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 419 third-party dependencies.
     (CC0 1.0 Universal) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.2 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.6.2 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.6.2 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB MCP Server (com.arcadedb:arcadedb-mcp:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mcp/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)

@claude

claude Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review

Went through the diff in detail (RaftHAServer ambiguity-warning rework, the teardown-ordering fix in BaseGraphServerTest/TestServerHelper, the EXPLAIN/PROFILE-based test restorations, and the StallAwareStopwatch/@timeout pass). Overall this is a well-reasoned, well-tested set of fixes — each of the four issues gets a regression test that was verified red before the fix, and the root causes described in the PR body check out against the actual code:

  • Confirmed SERVER_DATABASE_DIRECTORY really does default to ${arcadedb.server.rootPath}/databases with SERVER_ROOT_PATH defaulting to null, and GlobalConfiguration.getValueAsString() really does call resolveSystemVariables(value, ""), substituting the empty string for an unresolved variable rather than failing. That's exactly the trap TestServerHelper.isResolvedTestPath now guards against, so the fix targets the actual bug rather than a plausible-sounding one.
  • The RaftHAServer change from AtomicBoolean latches to AtomicReference<String> verdict-memory is sound. isNewAmbiguityVerdict's plain getAndSet (not a CAS loop) is correctly reasoned in the javadoc — two threads observing two different real verdicts both logging is the desired outcome, not a race to fix.
  • MatchNodeStep.prettyPrint's new [id: ...] marker is a pure additive display change against pre-existing idFilter/dynamicIdExpression fields — no new state, low risk.
  • Array sizing in getRoutingTable/unambiguousPeerAddress (peers.size() + 1 for the owners array added alongside addresses/fromConfig) is consistent with the existing pattern and correctly explained (leader-joined-at-runtime not yet in raftGroup.getPeers()).
  • Timeout bumps are all in the "hang detector, not latency bound" direction the CLAUDE.md convention calls for, and the genuine latency claims (hugeRangeIsFreeOfHeap, hugeRangeIsLazyWhenTheLimitIsDisabled) get tighter StallAwareStopwatch.assertStayedUnder bounds behind the loosened @Timeout, which is the intended pattern.

Minor / non-blocking observations

  1. server/pom.xml and network/pom.xml now pull in arcadedb-engine's test-jar. That jar is only produced in the package phase (maven-jar-plugin's test-jar goal has no phase override in engine/pom.xml), so mvn -pl server test (or -pl network test) without -am and without a full verify/install reactor run will fail to resolve it or, worse per the existing CLAUDE.md warning, silently resolve a stale jar from ~/.m2. This is the same class of trap the project's CLAUDE.md already documents for arcadedb-gremlin-it, so it's not a new problem, but it's worth calling out explicitly here since it's a new cross-module edge — might be worth a one-line note next to the dependency in both POMs (something like "requires a verify/install reactor build, see CLAUDE.md") so the next person hitting a NoSuchMethodError or a silently-stale test-jar doesn't have to rediscover it.

  2. describeAmbiguity now always renders the full collision string on every getPeerHttpEndpoints()/unambiguousPeerAddress call, even when nothing is ambiguous, whereas the old code only built the StringBuilder rendering after confirming withheld was non-empty and the latch hadn't already fired. Given the group size is bounded by cluster peer count and the javadoc already notes these paths run "never on a data path," this is very unlikely to matter in practice — just flagging it since it's a small always-on cost added to what's described as a per-request path.

  3. BaseGraphServerTest.endTest()'s else branch (dropDatabasesAtTheEnd() == false) calls TestServerHelper.checkActiveDatabases(false) and TestServerHelper.deleteDatabaseFolders(getServerCount()) directly instead of the overridable deleteDatabaseFolders(). That matches the old (redundant) end-of-method behavior exactly, but it does mean a subclass that overrides deleteDatabaseFolders() to add extra cleanup (the PR mentions BaseRaftHATest, RaftStorageDirectoryIT) only gets that extra cleanup when dropDatabasesAtTheEnd() is true. Worth double-checking none of the current overrides rely on being called in the false case too — from a quick look this seems intentional and consistent with pre-PR behavior, just noting it since the control flow moved.

Test coverage

Strong — Issue6297TeardownDeletesTestFoldersIT (verified red pre-fix), Issue6297TeardownPathResolutionTest (pins the trap itself plus the guard's accept/refuse boundary), Issue6297AmbiguityRearmTest (rearm contract + stable-ordering rendering), and the EXPLAIN/PROFILE-based plan assertions in OpenCypherCountOptimizationTest/OpenCypherMatchEnhancementsTest all target the specific regression each issue describes rather than just re-asserting the happy path. No concerns here.

No blocking issues found.

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 419 third-party dependencies.
     (CC0 1.0 Universal) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.2 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.6.2 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.6.2 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB MCP Server (com.arcadedb:arcadedb-mcp:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mcp/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)

…gs that stay

Third review round on #6307, all three points non-blocking.

describeAmbiguity built a StringBuilder before discovering the collision map was
empty, which is the common case on a correctly declared cluster and the one
getPeerHttpEndpoints() asks about on every request. Returns early instead.

The engine test-jar is a package-phase artifact, so 'mvn -pl server test' without -am
resolves it from ~/.m2 and can run against a stale one - the trap CLAUDE.md already
documents for arcadedb-gremlin-it. Noted next to the dependency in both poms rather
than left for the next person to rediscover.

The endTest() else branch cannot go through the overridable deleteDatabaseFolders(),
because that drops the databases first and the branch exists precisely for a class
that asked it not to. Verified no current class combines the two: the only override
of dropDatabasesAtTheEnd() returning false (ServerReadOnlyDatabasesIT) does not
override deleteDatabaseFolders(), and the two that do (BaseRaftHATest,
RaftStorageDirectoryIT) inherit true. Written down at the call site.
@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 419 third-party dependencies.
     (CC0 1.0 Universal) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.2 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.6.2 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.6.2 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB MCP Server (com.arcadedb:arcadedb-mcp:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mcp/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)

@claude

claude Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review

This is a well-documented PR with unusually thorough reasoning in the commit messages, and the three prior in-PR review rounds already caught several sharp edges (duplicated teardown cleanup, the guard checking the concatenated path rather than just the prefix, the early-return on a clean describeAmbiguity). I checked the two biggest claims independently and both hold up:

  • Traced SERVER_DATABASE_DIRECTORY/SERVER_ROOT_PATH through GlobalConfiguration.getValueAsString() -> SystemVariableResolver -> VariableParser: confirmed a reset configuration really does resolve SERVER_DATABASE_DIRECTORY to exactly "/databases" (unresolved ${arcadedb.server.rootPath} substitutes to "", not an exception). The Issue6297TeardownPathResolutionTest assertion is accurate, and the original bug description is correct.
  • Confirmed BaseGraphServerTest.endTest()'s old code really did double-delete: the instance deleteDatabaseFolders() (line ~558) already ends in the same two TestServerHelper calls that used to run again unconditionally afterward. The new if/else in the finally fixes that redundancy correctly, and I checked all three subclasses that override dropDatabasesAtTheEnd()/deleteDatabaseFolders() (ServerReadOnlyDatabasesIT, BaseRaftHATest, RaftStorageDirectoryIT) against the "no class combines the two" claim in the third review round's commit message - it holds for the current codebase.

Bug: the routing-ambiguity warning doesn't actually rearm after a fix, unlike its peer-to-peer twin

RaftHAServer.warnAmbiguousRouting (ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAServer.java:2080) is documented as following "the same report-when-the-verdict-changes contract as its peer-to-peer twin" (warnAmbiguousPeerAddress), but the wiring doesn't achieve that.

warnAmbiguousPeerAddress gets its rearm-on-clean-pass behavior because getPeerHttpEndpoints() (line ~1986) calls it unconditionally on every invocation - including when nothing is ambiguous, which is exactly what lets describeAmbiguity return "" and isNewAmbiguityVerdict reset httpAmbiguityReported/httpsAmbiguityReported to null (see isNewAmbiguityVerdict, line ~2143).

warnAmbiguousRouting has no equivalent unconditional caller. It's only invoked from getRoutingTable (line 1789) inside:

if (table == null || table.readers().size() < resolved - 1)
  warnAmbiguousRouting(protocol, addresses, fromConfig, owners, resolved);

i.e. only when the current pass is already ambiguous. So routingAmbiguityReported.get(protocol) is only ever written when there's a collision, and is never cleared back to null when the cluster becomes healthy again - because on a clean pass warnAmbiguousRouting (and therefore isNewAmbiguityVerdict) is never called at all.

Concrete failure scenario: peers A and B collide on host:2490 -> warning logs once, routingAmbiguityReported stores "A, B -> host:2490". Operator fixes it -> getRoutingTable now returns a clean table, but the stored verdict is never reset. Later, the identical misconfiguration is reintroduced (e.g. the same address collision recurs) -> describeAmbiguity renders the same string "A, B -> host:2490" -> isNewAmbiguityVerdict compares it against the still-stale stored value -> equal -> nothing is logged, silently. This is precisely the "fixed and later reintroduced" case issue #6297 was filed to fix, and it's fixed for the peer-to-peer HTTP/HTTPS warning but not for the routing warning. getRoutingTable is a real, frequently-hit production path (bolt/.../BoltNetworkExecutor.java:1052, grpcw/.../GrpcErrorMapper.java:191), so this isn't just a test-only gap.

Suggested fix: make getRoutingTable call the warn path unconditionally (mirroring getPeerHttpEndpoints), or explicitly clear routingAmbiguityReported.get(protocol) when table != null && table.readers().size() >= resolved - 1.

Test coverage gap that let it through

Issue6297AmbiguityRearmTest thoroughly covers isNewAmbiguityVerdict as a pure function (including the clean-pass-clears-memory case), but nothing exercises the wiring - i.e. calling getRoutingTable through an ambiguous -> clean -> same-ambiguous-again sequence end-to-end the way you'd want given the whole point of this sub-fix. Issue6183AmbiguousRoutingIT only calls getRoutingTable once per protocol. An end-to-end test analogous to Issue6297AmbiguityRearmTest but driving getRoutingTable directly (like Issue6267AmbiguousPeerAddressWarningTest does for getPeerHttpEndpoints) would have caught this.

Everything else

  • MatchNodeStep.prettyPrint, the EXPLAIN/PROFILE-based plan assertions, and the StallAwareStopwatch migrations all look correct and match the fields/APIs they reference.
  • TestServerHelper.isResolvedTestPath/deleteResolvedFolder guard logic checked out against every case in Issue6297TeardownPathResolutionTest, including the //replication and reset-root edge cases - the reasoning about Path.normalize() collapsing repeated separators holds.
  • No security or performance concerns: the new allocations in the ambiguity-rendering path are on already-rare, non-data-path calls, consistent with the existing docstring's claim ("never on a data path").

Nice work overall - just the one real gap above, which is worth closing before merge since it silently defeats part of the stated purpose of the PR (#6297 (2)).

…e memory never clears

Real bug found by the fourth review round on #6307, and it defeated half of what
#6297 (2) was for.

isNewAmbiguityVerdict clears the memory when a pass finds no collision - that is what
makes a fixed-and-reintroduced misconfiguration get reported again. But both callers
consulted the warning only when the CURRENT view was already ambiguous, so a clean
pass never reached it. The stored verdict outlived the collision it described, and
the identical collision coming back later compared equal and was logged nowhere.

getRoutingTable now warns unconditionally. So does unambiguousPeerAddress, which had
the same gap one layer down and is why it applied to HTTPS as well: getPeerHttpEndpoints
already hands over every HTTP view, so the HTTP memory was being cleared by accident of
that one caller, while the HTTPS memory - reachable only through the per-peer accessor -
had nothing clearing it at all. Warning from a pass where the peer asked about is fine
but others collide also matches what the line already claims to be: a report of every
collision the pass found, not of the one address the caller asked about.

getRoutingTable's body is split into routingTableFor(protocol, leaderId) so the wiring
can be driven without a live Ratis division - getLeaderId() answers null until one
exists, which is before the warn path is reached, so nothing could otherwise exercise
the clean half. Both new tests were confirmed red against the guarded callers: the
reintroduced collision logs nothing, expected 2 actual 1.
@claude

claude Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review

Went through the full diff and cross-checked the final state of the touched files (not just the patch), since this PR already carries five rounds of self-review baked into its commit history. Summary: the code is correct as merged, well-tested, and the reasoning documented in commit messages/Javadoc holds up under inspection. A few notes below, all non-blocking.

Correctness — verified

  • BaseGraphServerTest.endTest() / TestServerHelper: traced the final control flow (server/src/test/java/com/arcadedb/server/BaseGraphServerTest.java:233-270). The finally-within-finally nesting is correct: cleanup now runs before GlobalConfiguration.resetAll(), the if/else on dropDatabasesAtTheEnd() no longer duplicates the TestServerHelper calls (fixed in the 2nd review-round commit), and checkArcadeIsTotallyDown() runs for both branches.
  • TestServerHelper.isResolvedTestPath / deleteResolvedFolder: confirmed the guard checks the concatenated prefix+suffix (not just the prefix, per the 3rd-round fix), and walked the Path.of(...).normalize() logic against the actual defaults — SERVER_DATABASE_DIRECTORY really does resolve to /databases after resetAll() (empty-string substitution for the unresolved ${arcadedb.server.rootPath} variable), and the guard correctly refuses it while accepting ./target/databasesN and @TempDir-based absolute paths. Good defense-in-depth given the blast radius of a deleteRecursively bug in test code.
  • RaftHAServer ambiguity-verdict rearm: the final wiring in routingTableFor and unambiguousPeerAddress calls warnAmbiguousRouting/warnAmbiguousPeerAddress unconditionally on every resolved view (not just ambiguous ones), which is what lets a clean pass clear AtomicReference<String> memory — this was the real bug the 5th commit fixed (callers previously only consulted the warning when already ambiguous, so the memory never cleared). Confirmed isNewAmbiguityVerdict's getAndSet (vs. a CAS loop) is a deliberate choice, and the reasoning in the Javadoc (two threads with two different real verdicts should both log, not race to suppress one) is sound.
  • MatchNodeStep.prettyPrint: idFilter is a plan-time-final String field (not something mutated at execution), so printing it from EXPLAIN/PROFILE without running the query is safe and matches the doc comment's claim.
  • OpenCypherCountOptimizationTest / OpenCypherMatchEnhancementsTest: the restored EXPLAIN-based assertions and the new issue3216_idFilterPushedDownForBothMatchStrategies test replace timing-based assertions with structural ones (plan text), which is the right fix for flakiness — a wall-clock comparison between two forms is exactly the kind of assertion issue Wall-clock assertions in the engine suite go red on the shared JVM's stop-the-world pauses, not on the behaviour they test #6260 exists to eliminate.

Minor observations

  1. Comment density. Several classes/methods carry multi-paragraph Javadoc blocks explaining the full history of the bug, alternatives considered, and cross-references to other methods (e.g. RaftHAServer.warnAmbiguousPeerAddress, TestServerHelper.deleteDatabaseFolders). They're all "why," not "what," so they clear the project's bar for justified comments, but the sheer volume makes some methods harder to scan at a glance. Not asking for a rewrite, just flagging that a future trim pass might be worth it once the design has settled and doesn't need re-litigating.
  2. @Timeout widened generously (5s/10s/30s → 60s; 30s/60s → 90s/120s in LockManagerFairnessTest). Given they're now explicitly hang-detectors backed by structural assertions (per the new class-level Javadocs), this is the right call, but it does mean a genuine hang in CI now takes up to 2 minutes to surface for the LockManagerFairnessTest stress methods rather than 30-60s. Acceptable trade-off for eliminating stall-induced flakiness, just worth knowing if CI wall-clock budgets are tight.
  3. network/pom.xml and server/pom.xml correctly add the arcadedb-engine test-jar at test scope and proactively document the -am/stale-artifact trap inline — good, since this is exactly the kind of thing that silently produces a green-but-meaningless run otherwise (as CLAUDE.md's build notes already warn about for arcadedb-gremlin-it).
  4. No security concerns: all production-code changes are confined to MatchNodeStep.prettyPrint (adds a diagnostic string to an already-diagnostic-only method, no behavior change to query execution) and RaftHAServer's warning/logging paths (no change to routing/resolution logic itself, only to when the warning fires and what it remembers).

Test coverage

Good — new unit tests directly pin the two trickiest contracts (Issue6297TeardownPathResolutionTest for the path guard, Issue6297AmbiguityRearmTest for the verdict-rearm state machine, including the wiring-level tests added in the 5th commit that were confirmed red against the pre-fix callers). The Issue6297TeardownDeletesTestFoldersIT regression test correctly uses @AfterAll since that's the only hook that runs after @AfterEach.

Nothing else stood out. Nice work tracking down the /databases collapse and the verdict-memory gap — both are the kind of bug that's easy to introduce and very hard to spot from a diff alone.

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 419 third-party dependencies.
     (CC0 1.0 Universal) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.2 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.6.2 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.6.2 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB MCP Server (com.arcadedb:arcadedb-mcp:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mcp/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)

…sserted the walk

CI caught it: hugeRangeIsLazyWhenTheLimitIsDisabled measured 20,570 ms with 0 ms of
JVM stall - not a pause, 20 seconds of real work - against the 10 s bound this PR put
around all three queries.

The premise was wrong, not the number. size() and indexing really are answered from
start, step and size alone: 8 ms and 1 ms measured. IN is not. InExpression.evaluateTernary
walks the list element by element, and has to, because Cypher's three-valued logic makes
a null anywhere in the list turn a non-match into null rather than false - something
List.contains cannot report, so it cannot delegate to LongRangeList's O(1) contains().
That walk is O(n) whether the range is lazy or not, 3 s locally and 20 s on a CI runner
for an element near the end, and a bound around it was measuring the walk rather than
the claim.

So the window now covers the two reads that carry the claim, at a bound five times
tighter than the one that failed, and IN stays in the test - it is real coverage of a
huge range - bounded by the @timeout hang detector like every other non-claim here.

The sibling bound in LongRangeListTest is unaffected and passed CI in 0.012 s: that one
calls LongRangeList.contains() directly, which IS the O(1) path.

Worth filing separately: Cypher IN over a lazy list could take the O(1) contains() when
the list holds no null, which is the common case and the only one where the walk is pure
cost. Out of scope here - it is an evaluation change with its own semantics to pin.
@codacy-production

codacy-production Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity

Metric Results
Complexity 4

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 419 third-party dependencies.
     (CC0 1.0 Universal) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.2 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.6.2 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.6.2 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB MCP Server (com.arcadedb:arcadedb-mcp:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mcp/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)

@claude

claude Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review

This is an unusually well-documented PR — the four issues it closes are narrow, each fix is backed by a regression test that was verified red on the old behavior, and the commit history shows four rounds of self-review already caught and fixed real problems (the CAS-loop question on isNewAmbiguityVerdict, the duplicated teardown cleanup, the guard checking the prefix instead of the concatenated path, and — most notably — the "clean pass never reaches the warning so the memory never clears" bug in the final commit). I read through the full diff rather than re-litigating what's already been fixed. A few notes:

Minor: claimsByAddress is computed twice per getRoutingTable call

In RaftHAServer.routingTableFor (ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAServer.java:1802), selectUnambiguousRouting builds a claims map internally, and then the now-unconditional warnAmbiguousRouting call immediately rebuilds the same map from the same addresses/fromConfig/count via a second claimsByAddress call (RaftHAServer.java:2109-2110). Since warnAmbiguousRouting now runs on every call (not just the ambiguous case), this is a real per-request duplicate HashMap build rather than an occasional one. The PR description already acknowledges the cost ("it costs the two small maps describeAmbiguity builds"), and it's genuinely cheap at real cluster sizes, but since selectUnambiguousRouting already has the map in hand, it would be free to thread it through instead of recomputing — the same pattern unambiguousPeerAddress already uses (compute claims once, pass it to warnAmbiguousPeerAddress). Not blocking, just a small missed reuse.

Verified, no issues found

  • TestServerHelper.isResolvedTestPath/deleteResolvedFolder: walked through every case in Issue6297TeardownPathResolutionTest by hand against Path.normalize() semantics (including the //replication and collapsed-root cases) — the guard's accept/refuse set matches what the tests assert, and the SERVER_ROOT_PATH == null guard is correct (the field's default really is Java null, not the string "null", per GlobalConfiguration.getValueAsString()).
  • BaseGraphServerTest.endTest() / StaticBaseServerTest.beginTest() reordering: confirmed the else branch's assumption ("no class both returns dropDatabasesAtTheEnd() == false and overrides deleteDatabaseFolders()") is actually true today — ServerReadOnlyDatabasesIT overrides only the former, BaseRaftHATest/RaftStorageDirectoryIT override only the latter and both call super.deleteDatabaseFolders().
  • The isNewAmbiguityVerdict/describeAmbiguity rearm logic in RaftHAServer: the plain getAndSet (vs. a CAS loop), the unconditional calls from both routingTableFor and unambiguousPeerAddress (needed so a clean pass can clear the memory), and the stable sort in describeAmbiguity all check out against the test suite in Issue6297AmbiguityRearmTest.
  • MatchNodeStep.prettyPrint, OpenCypherCountOptimizationTest.planOf, and the StallAwareStopwatch.assertGaveUpWithin/assertStayedUnder call sites all match their current signatures.

Test coverage

Strong — new regression tests are paired with the specific ordering/state bugs they cover (Issue6297TeardownDeletesTestFoldersIT asserts in @AfterAll specifically because that's the only hook after @AfterEach; Issue6297AmbiguityRearmTest covers the rearm contract plus the two caller-wiring gaps found in review). No regressions I could find in test coverage or assertion strength — if anything the PR strengthens several previously-weak assertions (the duration >= 0 tautology, the commented-out EXPLAIN checks).

Nothing here blocks merging.

Sixth review round on #6307, non-blocking. selectUnambiguousRouting builds the
claim counts internally and warnAmbiguousRouting rebuilt the same map from the same
view - occasional before, but the warning now runs on every call, so it was a
duplicate HashMap per ROUTE request and per refusal. Counted once in routingTableFor
and handed to both, which is what unambiguousPeerAddress already does with its twin.

selectUnambiguousRouting keeps its four-argument form as a delegating overload, so
Issue6183AmbiguousRoutingTest still drives it the way it did.
@claude

claude Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review of #6307

I went through the diff in detail (RaftHAServer, TestServerHelper/BaseGraphServerTest/StaticBaseServerTest, MatchNodeStep, and the various @Timeout/StallAwareStopwatch changes) and cross-checked several claims against the merged tree (this branch is already merged into the checked-out working copy, which let me verify full file context, not just diff hunks). Overall this is a well-reasoned, well-documented PR — the commentary in the code explains why for each change, which makes it easy to verify. A few notes below, nothing blocking.

Correctness

  • BaseGraphServerTest.endTest() reordering (Follow-ups from #6267: a teardown that deletes /databases0 instead of the test's folders, a warn-once latch that never rearms, and two notes already in code #6297.1) checks out. Walked the full method: the outer try { checkDatabasesAreIdentical(); } finally { cleanup } structure means the cleanup always runs (no path skips it), GlobalConfiguration.resetAll() is now safely tucked into the innermost finally so it still runs even if checkArcadeIsTotallyDown() throws, and the reordering also incidentally removes a duplicate TestServerHelper.checkActiveDatabases/deleteDatabaseFolders call that used to fire twice when dropDatabasesAtTheEnd() was true (once via the instance deleteDatabaseFolders(), once via the unconditional trailing calls that existed before this PR). Confirmed the two subclasses that override deleteDatabaseFolders() (BaseRaftHATest, RaftStorageDirectoryIT) both call super.deleteDatabaseFolders(), so the 'ends in exactly the two TestServerHelper calls' assumption in the new comment holds.
  • TestServerHelper.isResolvedTestPath logic (blank/absolute-single-segment → refuse) looks right for the cases exercised, including the @TempDir case. Worth a passing thought for Windows-style paths (C:\databasesN normalizes to a single name component after the root, so it'd be refused too) — but since this is test-only code exercised on Linux/macOS CI runners, that's a non-issue in practice rather than a real risk.
  • RaftHAServer ambiguity-verdict rework: the AtomicReference<String> keyed on the rendered collision line (instead of a spent AtomicBoolean latch) is a clean design, and the 'hand every resolved view, ambiguous or not, to the warning so a clean pass clears the memory' fix is correctly threaded through all three call sites (routingTableFor, getPeerHttpEndpoints, unambiguousPeerAddress). I specifically checked that unambiguousPeerAddress now calls warnAmbiguousPeerAddress before the early-return for a clean verdict on the asked-about peer — previously a caller repeatedly asking about a healthy peer while a different pair collided elsewhere would never clear (or even reach) the memory. Also verified the 4-arg selectUnambiguousRouting overload is preserved for backward compat with Issue6183AmbiguousRoutingTest, and that the log message text for warnAmbiguousPeerAddress is unchanged (only warnAmbiguousRouting's message gained the named collisions), so there's no risk of silently breaking a message-text assertion elsewhere.
  • The documented, deliberate choice of a plain getAndSet over a CAS loop in isNewAmbiguityVerdict (letting two racing 'different' verdicts both log) is reasonable and well justified in the comment — duplicate warnings about a real config change is the right failure mode vs. silently dropping one.
  • MatchNodeStep.prettyPrint's new [id: ...] marker correctly reads the pre-existing idFilter/dynamicIdExpression fields; nothing new introduced there beyond the print itself.

Minor / nitpick

  • RaftHAServer.java field alignment: httpAmbiguityReported has two spaces before = while httpsAmbiguityReported has one (around the new field declarations) — trivial formatting inconsistency, not worth a round-trip on its own but easy to fix next time the file is touched.
  • warnAmbiguousPeerAddress/warnAmbiguousRouting/describeAmbiguity/claimsByAddress all moved from private to package-private 'for testing' — consistent with the existing selectUnambiguousRouting pattern in this class, so no objection, just flagging that RaftHAServer's package-private test surface keeps growing.
  • Performance: unambiguousPeerAddress now unconditionally builds describeAmbiguity's sorted collision report on every call (the resync/verify paths call this per attempt), whereas before the report was only built when the specific peer being asked about was itself ambiguous. This is documented as intentional and is bounded by cluster size (never a data-path call, per the existing docstring), so it's fine — just noting the trade-off is a few extra small allocations per resync/verify attempt in exchange for correct memory-clearing.

Test coverage

Coverage is thorough and matches CLAUDE.md conventions (regression tests per issue, @Tag usage, AssertJ-style assertions). Issue6297AmbiguityRearmTest, Issue6297TeardownDeletesTestFoldersIT, and Issue6297TeardownPathResolutionTest all target the exact defects described, including the 'wiring, not just the decision function' tests (theRoutingCallerHandsOverACleanPassToo, thePeerAddressCallerHandsOverACleanPassToo) that verify the caller actually exercises the clean-pass path, not just the pure function in isolation. The StallAwareStopwatch migration for #6270 is scoped sensibly — only genuine O(1) laziness claims get assertStayedUnder, everything else stays a generous @Timeout hang detector — consistent with the project's stated policy on wall-clock assertions.

I did not run the build in this environment (sandboxed session, tooling restrictions on invoking mvn), so this is a static review — the PR description states the relevant suites were run, and the change reads as internally consistent with that, but it's worth confirming CI is fully green before merge given the scope (26 files touching four independent issues).

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 419 third-party dependencies.
     (CC0 1.0 Universal) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.2 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.6.2 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.6.2 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB MCP Server (com.arcadedb:arcadedb-mcp:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mcp/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.47826% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.29%. Comparing base (11763ff) to head (5f93704).

Files with missing lines Patch % Lines
...query/opencypher/executor/steps/MatchNodeStep.java 25.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6307   +/-   ##
=======================================
  Coverage   70.29%   70.29%           
=======================================
  Files        1842     1842           
  Lines      159382   159404   +22     
  Branches    33574    33578    +4     
=======================================
+ Hits       112042   112060   +18     
+ Misses      33459    33458    -1     
- Partials    13881    13886    +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lvca lvca added this to the 26.9.1 milestone Aug 17, 2026
lvca added a commit that referenced this pull request Aug 17, 2026
…t wrote, a warning that speaks again, and bounds that say what they are for (#6307)

Four test-hygiene follow-ups from #6267 / #6268, fixed together.

#6297 (1) - the teardown resolved its paths from a configuration it had just reset.
BaseGraphServerTest.endTest() called GlobalConfiguration.resetAll() before the cleanup,
and every path TestServerHelper.deleteDatabaseFolders() deletes is resolved at call
time from SERVER_DATABASE_DIRECTORY, whose default is ${arcadedb.server.rootPath}/databases
over a root path that defaults to null and resolves to the empty string. So the cleanup
deleted /databases0 while the test's own ./target/databases0 - and the .raft-storage under
it - survived. The reset now runs last, inside a finally that also covers the deletes so a
failing checkDatabasesAreIdentical no longer skips them; StaticBaseServerTest.beginTest
configures before it cleans for the same reason; and a guard refuses a path that did not
resolve, so a future reordering degrades to a logged no-op rather than a recursive delete
at the filesystem root.

#6297 (2) - the ambiguity warnings no longer go permanently quiet. The warn-once latches
are replaced by the rendered collision list itself, so any change to the verdict is
reported and an unchanged verdict stays quiet whatever the cluster did in between. Both
callers now hand over every resolved view, ambiguous or not: a clean pass is the only thing
that clears the memory, and guarding on "is it ambiguous now?" left the stored verdict
outliving the collision it described - so the same collision, reintroduced after the
operator fixed it, compared equal and was logged nowhere. That gap covered HTTPS too, since
only getPeerHttpEndpoints was unconditional and only for HTTP.

Items (3) and (4) of #6297 stay as tracking entries: the next cut of RESYNC_RETRY_TIMEOUT_MS
needs runs at the new report threshold before there is a number to choose, and isolating the
heavy HA ITs into their own fork is a CI-lane change whose regression signal is a series of
full-suite runs, not a test.

#6280 - OpenCypherCountOptimizationTest could not see the count push-down regress: a full
type scan returns the same count, just slower. EXPLAIN does route through the openCypher
engine and does describe the push-down, so the six assertions commented out behind a TODO
are restored against it, and the alias, empty-type and polymorphic cases get one too.

#6279 - issue3216_performanceComparisonMatchStrategies asserted only that two elapsed times
were not negative. Its premise was also obsolete: extractIdFilter lifts an
ID(x) = <literal|parameter> equality into the MatchNodeStep at plan time, which is what
#3216 was closed on, and it applies to the single-MATCH form exactly as to the split one.
MatchNodeStep.prettyPrint now names the RID it was given, so the test asserts the structural
property - neither form scans - with a control query the push-down cannot serve.

#6270 - the wall-clock pass done for the engine suite in #6268, applied to server and
network: four bounds separating a bounded operation from an unbounded one now measure
through StallAwareStopwatch. HTTPAuthSessionIT needed nothing - its two sites are a lower
bound and a field-presence check. The @timeout classification pass covers the engine
annotations at 45s or under: they are hang detectors whose claim is carried by a structural
assertion, so they are sized clear of an honest budget plus a stall, except the genuine
laziness claims which are asserted on the discounted clock with the annotation left behind
them. The stall sampler is renamed out of the engine's thread namespace so a leak detector
cannot mistake it for engine machinery.

Closes #6297
Closes #6280
Closes #6279
Closes #6270
@lvca

lvca commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

Merged into main as 260ce46 (squash), since the GitHub merge button was unavailable.

main had moved 8 commits ahead of this branch, so origin/main was merged in first (4dc043f, pushed here) - the only overlapping file was RaftHAServer.java and git resolved it cleanly. The merged tree was rebuilt and the affected suites re-run green before the squash: the ha-raft ambiguity tests, the #6297 teardown regression tests, Issue5418ShutdownHookDeadlockTest, and the engine range/openCypher/stopwatch tests.

The squash commit's tree is byte-identical to this branch's merged tip, and its diff against main is exactly this PR's 26 files. Closing manually: a squash does not make this branch's tip reachable from main, so GitHub cannot mark it merged automatically. #6297, #6280, #6279 and #6270 were closed by the commit's trailers.

@lvca lvca closed this Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 419 third-party dependencies.
     (CC0 1.0 Universal) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.2 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.6.2 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.6.2 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB MCP Server (com.arcadedb:arcadedb-mcp:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mcp/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)

@lvca lvca reopened this Aug 17, 2026
@lvca
lvca merged commit 2b94111 into main Aug 17, 2026
18 of 31 checks passed
@lvca
lvca deleted the issue-6297-6280-6279-6270 branch August 17, 2026 16:21
@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 419 third-party dependencies.
     (CC0 1.0 Universal) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.2 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.6.2 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.6.2 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB MCP Server (com.arcadedb:arcadedb-mcp:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mcp/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)

lvca added a commit that referenced this pull request Aug 18, 2026
…s the plan it would run (#6344)

* fix(#6323): membership in a range is a division, and EXPLAIN describes the plan it would run

Three follow-ups from #6307, plus two defects the work walked into.

1. The two items #6297 carried and #6307 did not implement lost their tracker when the
   `Closes #6297` trailer closed the issue. They are refiled as #6343, and the comments in
   `BaseRaftHATest` that were the only remaining record now name it. The `slow-unit-tests`
   lane was capped at 60 min while its honest duration has been measured between 39m27s and
   57m40s, and one run was CANCELLED at 1h0m16s while progressing normally: a cap inside its
   own spread goes red on runner speed alone, and it goes red as "the job failed". It is a
   hang detector, so it is now sized above the slowest honest run, at 90 min.

2. `IN` walked the list element by element, so against the lazy `range()` of GHSA-xmjm its
   cost was the POSITION of the match - 3 s locally and about 20 s on a CI runner for an
   element near the end of `range(0, 999999999)`, and the full walk for every miss. A range
   is an arithmetic progression whose elements are never null, so both the match and the miss
   are a division. The walk is not replaced by `List.contains`: membership is equality, and
   Cypher's `=` coerces numerically (`5.0 = 5` is true, as in Neo4j) where `equals()` does
   not, so the fast path reproduces the comparator's own answer - the RID-string interop
   included - and declines to the walk past 2^53, where a double stops naming one long.
   `null IN list` is answered from the list's emptiness alone, for any list.

   `LongRangeList.indexOf` keeps answering the `List` contract, which is `equals()`, and now
   rejects `BigInteger`/`BigDecimal` as it already rejected `Double`/`Float`: truncating them
   to a long made every value congruent to an element modulo 2^64 answer as that element.
   Membership by value is `containsLong`, for the callers whose equality coerces.

3. `EXPLAIN` described only the count push-down and the cost-based physical plan, so a query
   the optimizer does not claim got a reason and nothing else, while `PROFILE` of the same
   query printed the whole step chain. That left the one command whose purpose is inspecting
   a plan WITHOUT running it strictly less informative than the one that runs it - no use for
   a slow query, and wrong for a writing one, since `PROFILE MATCH ... SET ...` does write.
   The chain is now built and never pulled, and described; a UNION is described branch by
   branch, and the structured step list is published alongside the text.

Found while doing the above:

- Slicing a range copied the slice into an `ArrayList`, so `range(0, 999999999)[0..1000000000]`
  allocated a billion boxed longs and exhausted the heap - the failure the lazy range was
  introduced to remove. A slice of a range is a range. The slicing itself moves into the AST
  node, which `ExpressionEvaluator` now calls instead of carrying a second copy of it that was
  fixed one at a time.
- Nine steps closed the parenthesis of their profiling suffix before the row count joined it,
  printing `(511us), 1 rows)`. Comparing the EXPLAIN and PROFILE chains is what made the two
  texts comparable enough to notice.

* fix(#6323): describe the steps that follow an optimized MATCH, and say which label the edge count filters on

Review follow-ups on PR #6344.

The suggested smoke test - that SET, REMOVE, DELETE, MERGE, FOREACH and a relationship CREATE
are described by EXPLAIN without firing, not only CREATE - found that EXPLAIN of a write the
optimizer claims described the scan and never mentioned the write at all. The optimizer claims
the MATCH pattern only; every clause after it stays an execution step appended to the operator
chain, and printing the physical plan alone left them out. Both EXPLAIN and PROFILE now name
them, under the physical plan they run after.

That in turn made `CountEdgesReturnStep` visible in a plan where a test asserted it was absent.
The assertion was stale: the step has taken a targetLabel since the push-down learned to filter
by it, so it applies to a labelled counted node and counts what that label reaches - which the
test's own correctness assertion has been proving all along. It held only because the plan text
never printed the step. The step now prints the label it filters on, for the reason
MatchNodeStep prints the id it seeks, and the test asserts what actually happens.

Also from the review: the Short/Byte case in rangeMembership says why converting through a long
and comparing through a double reach the same answer; the optimized branch of explain() says
that its structured steps are built from the same PhysicalPlan instance the text is printed
from, so the two cannot describe different plans, and the test asserts they name the same
operator; the LogManager import moves into alphabetical position.

* fix(#6323): a UNION is planned per branch, and EXPLAIN says so instead of claiming the optimizer was not used

Review follow-up on PR #6344.

A UNION has no plan of its own: the planner leaves its physicalPlan null and plans each branch
separately, so `canUseOptimizedPhysicalPlan()` is always false for the union itself and EXPLAIN
printed "Reason: Query pattern not yet supported by optimizer" for every UNION - directly above
the `+ OPTIMIZED MATCH (physical operators)` that a branch the optimizer DID claim prints
underneath it. The text now says what is actually true, and the test asserts both halves: the
per-branch header, and that each branch reports the path it takes.

* fix(#6323): a malformed slice bound says so on both paths, not ClassCastException on one of them

Review follow-up on PR #6344.

The slice dedup left the bound parsing behind: the AST node validated a non-numeric bound and
said what was wrong with the query, while the aggregation-aware evaluator cast straight to
Number and raised a bare ClassCastException for the same query. That is the divergence the
refactor exists to remove, so the bound parsing is shared too.

* fix(#6323): a plan that cannot be built is part of the answer, and the 2^53 bound says why it is inclusive

Review follow-ups on PR #6344.

The suggestion to relax the exact-double bound from `>= 2^53` to `> 2^53`, to match
DistinctNumericKey, would have introduced a wrong answer: 2^53 is exactly representable, but
2^53+1 is NOT, and rounds ties-to-even down onto the same double, so at that magnitude two longs
already share one double. Taking the fast path there would pick one of them and answer false for
a range that holds only the other. The bound stays inclusive, the comment now says why, and a
test builds both ranges and pins each answer against the walk's.

EXPLAIN no longer swallows a plan it could not build into a FINE log nobody has enabled. The
failure is named in the description instead: EXPLAIN answers a question about a query, and a
query that cannot be planned is an answer to it - the statement would fail the same way when
run. A query that does not PARSE keeps raising, since there is no plan to describe and the parse
error already says why.

* test(#6323): strip only the timing PROFILE appends, not any parenthesis starting with a digit

Review follow-up on PR #6344. The EXPLAIN/PROFILE chain comparison stripped from the first
`(<digit>` to the end of the line, so a step whose own text ended in one would have dropped out
of the comparison along with the timing. The pattern now matches the shape
AbstractExecutionStep actually appends: a duration in microseconds, optionally followed by a
row count.

* test(#6323): a CALL is described without being run either, and say why its failure message is safe to print

Review follow-ups on PR #6344, both non-blocking.

A CALL is the one step whose body is a plan of its own, so it is the one that could do eager
work while being built rather than while being pulled. Both shapes join the write-safety test:
a CALL subquery that writes, and a procedure call.

The message appendPlanBuildFailure prints tells the caller nothing that running the same
statement would not - execute() builds this very chain and lets what it throws reach the client,
and EXPLAIN needs no privilege beyond running the query it describes. Said in the javadoc, since
the question is a fair one to ask of any text that reaches a user.

* fix(#6323): a statement with no chain says it has none, instead of announcing the route it would have taken

Review follow-up on PR #6344, non-blocking. "Execution will use step-by-step interpretation" was
a route-selection message, true when EXPLAIN reached that line without ever building anything.
It is now the branch for a statement that built no chain at all, where announcing the route
describes nothing. It says what is true of such a statement instead, and the one test that
asserted the old sentence asks for the step chain that replaced it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment