Repository navigation
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
Conversation
…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.
|
Tick the box to add this pull request to the merge queue (same as
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
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.
ReviewThis 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 ( Correctness
Minor / non-blocking observations
Test coverageStrong - 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 Performance / SecurityNo concerns. All changes are test-only or test-infrastructure except the Note: I wasn't able to run |
📜 License Compliance Check✅ License check passed. See artifacts for full report. License Summary (first 50 lines) |
…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.
|
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
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:
Minor / non-blocking
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.
📜 License Compliance Check✅ License check passed. See artifacts for full report. License Summary (first 50 lines) |
ReviewWent 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:
Minor / non-blocking observations
Test coverageStrong — No blocking issues found. |
📜 License Compliance Check✅ License check passed. See artifacts for full report. License Summary (first 50 lines) |
…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.
📜 License Compliance Check✅ License check passed. See artifacts for full report. License Summary (first 50 lines) |
ReviewThis 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
Bug: the routing-ambiguity warning doesn't actually rearm after a fix, unlike its peer-to-peer twin
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 Concrete failure scenario: peers A and B collide on Suggested fix: make Test coverage gap that let it through
Everything else
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.
ReviewWent 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
Minor observations
Test coverageGood — new unit tests directly pin the two trickiest contracts ( Nothing else stood out. Nice work tracking down the |
📜 License Compliance Check✅ License check passed. See artifacts for full report. License Summary (first 50 lines) |
…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.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
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.
📜 License Compliance Check✅ License check passed. See artifacts for full report. License Summary (first 50 lines) |
ReviewThis 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 Minor:
|
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.
|
Review of #6307 I went through the diff in detail ( Correctness
Minor / nitpick
Test coverage Coverage is thorough and matches CLAUDE.md conventions (regression tests per issue, I did not run the build in this environment (sandboxed session, tooling restrictions on invoking |
📜 License Compliance Check✅ License check passed. See artifacts for full report. License Summary (first 50 lines) |
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
…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
|
Merged into
The squash commit's tree is byte-identical to this branch's merged tip, and its diff against |
📜 License Compliance Check✅ License check passed. See artifacts for full report. License Summary (first 50 lines) |
📜 License Compliance Check✅ License check passed. See artifacts for full report. License Summary (first 50 lines) |
…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.
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()calledGlobalConfiguration.resetAll()before the cleanup. Every pathTestServerHelper.deleteDatabaseFolders()deletes is resolved at call time fromSERVER_DATABASE_DIRECTORY, whose default is${arcadedb.server.rootPath}/databasesover a root path that defaults tonull, andgetValueAsString()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-storageunder it - survived teardown untouched.finallythat now also covers the deletes, so a failingcheckDatabasesAreIdentical()no longer skips the cleanup entirely (that is the cross-class disk-state leak the issue suspected behind theDynamicMembershipTest"DB1 5 <> DB2 15").StaticBaseServerTest.beginTest()had the mirror-image bug - it cleaned beforesetTestConfiguration(), so on the first class in a fork it cleaned/databases0too. Configuration first now.TestServerHelper.isResolvedTestPathrefuses 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@TempDirunder 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 adeleteRecursivelyat/.Issue6297TeardownDeletesTestFoldersITasserts in@AfterAll- the only hook JUnit runs after@AfterEach- that./target/databases0is gone. Verified it goes red on the old ordering:Issue6297TeardownPathResolutionTestpins 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 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;
warnAmbiguousRoutingnow 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.Issue6297AmbiguityRearmTestcovers 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:
RESYNC_RETRY_TIMEOUT_MSis a decision that needs a handful ofha-integration-testsruns at the new 5 s report threshold. There is no code change to make until those runs exist; making one now would be guessing at the number the issue asks to measure.#6280 EXPLAIN is no longer the blocker
The TODO said "EXPLAIN integration needs to be added separately". It does not:
OpenCypherQueryEngineroutes anEXPLAINprefix andCypherExecutionPlan.explain()describes the count push-down first, precisely because the push-down replaces the whole chain.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.
EXPLAINrather thanPROFILEon 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_performanceComparisonMatchStrategiesassertedduration >= 0twice, which cannot fail. Its premise had also expired:CypherExecutionPlan.extractIdFilterlifts anID(x) = <literal|parameter>equality out of the WHERE clause into theMatchNodeStepat plan time - the fix #3216 was closed on - and it applies to the single-MATCH form exactly as it does to the split one. RestoringassertThat(duration2).isLessThan(duration1)would have asserted something false.Rather than deleting the test, the property it was reaching for is made visible.
MatchNodeStep.prettyPrintnow names the RID it was given, alongside[index: ]and[filter: ]: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 thebenchmarklane, since it no longer times anything.#6270 The wall-clock and @timeout pass, outside the engine suite
Four elapsed-time bounds in
server/networknow measure throughStallAwareStopwatch, all of them category 1 (a tripwire between a bounded operation and an unbounded one), allassertGaveUpWithin:Issue5470BatchStreamStallIT,Issue5470BatchErrorDeliveryIT,Issue5418ShutdownHookDeadlockTest,RemoteHttpComponentTest.Two premises in the issue were wrong and are worth recording:
HTTPAuthSessionITneeds nothing. Its two sites areelapsedFromCreation() >= 100(a lower bound, which a stall only makes more true) and a field-presence check. Same forPostBatchHandlerIT, whoseelapsedMs >= 0is a response-field sanity check, not a latency bound.serverandnetworkdid not already consume the engine test-jar. Neither declares it and neither usesTestHelper. Added at test scope in both poms - no new external dependency; the artifact is already produced byengine/pom.xml.The
@Timeoutpass 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 -containsExactlyon the returned elements,isInstanceOf(LongRangeList.class)on the lazy one,assertThatThrownByon 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.RangeFunctionTest(5 s/10 s -> 60 s),IndexDescOrderDuplicateKeysTest,LongObjectHashMapTest(SEPARATE_THREADkept - the regression is an infinite probe loop),HashIndexOverflowCycleTest, the two rejection cases inCypherRangeHeapExhaustionTest, andLockManagerFairnessTest, 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.LongRangeListTest.hugeRangeIsFreeOfHeapandCypherRangeHeapExhaustionTest.hugeRangeIsLazyWhenTheLimitIsDisabled- are now asserted withassertStayedUnderon the discounted clock, which is tighter than the annotation it replaces, with the annotation left behind as the hang detector.servermodule's four@Timeout(60)inRangeHeapExhaustionHttpStatusITare 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 prefixDatabaseLifecycleBackgroundThreadsTestscans 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.StallAwareStopwatchTestnow pins the name against all three scanned prefixes.Verification
Issue6297TeardownDeletesTestFoldersITverified red on the pre-fix ordering, green after.enginecom.arcadedb.query.opencypher.**, the touchedengineutility/index/function classes,ha-raftunit lane,serverunit lane,networkRemoteHttpComponentTest,serverIssue5470BatchErrorDeliveryIT.