Repository navigation
Fixes #33738: keep multi-node suites out of the parallel lane and make alert scheduling idempotent - #33739
Merged
Conversation
CsvExportMultiNodeIT boots extra full OpenMetadata servers inside the shared test JVM. It is @tag("multi-node") and listed in integrationTests.multiNodeTests, but unlike its three siblings it was never added to an isolated-tests <includes> or a parallel-tests <excludes> list, so it also ran in the parallel lane next to 4 concurrent workers -- replacing process-wide singletons and joining the clustered Quartz job store underneath every other suite in the fork. That is what produced the two unrelated-looking merge-queue failures: the lifecycle dispatcher NPE (mechanism since fixed by #33712) and the Quartz "Unable to unschedule trigger [...] while deleting job [...]" 500. Add it to all 8 include and all 8 exclude lists, and repair the tag backstop that should have caught the omission: excludedGroups sat inside systemPropertyVariables where failsafe never reads it, a mistake the pom already documents for search-it and ui-it. It is now a direct <configuration> child in every parallel-tests execution, and all four multi-node classes carry @tag("multi-node"), so a future one is excluded even if the filename lists are forgotten. Also close the Quartz race itself, which is reachable outside tests -- every node reinstalls every subscription on startup against one clustered job store, so a rolling restart hits it. QuartzScheduler.deleteJob lists a job's triggers and then unschedules them in separate transactions and throws when one is already gone, which is the state being asked for rather than a failure. The enabled path now writes the job and its trigger in a single transaction with replace=true instead of delete-then-add, which also removes the window where the alert is unscheduled at all; delete drops the trigger before the job and accepts a lost race once the job is confirmed gone. Finally, SessionMultiNodeCluster now refuses to start when it finds itself in a fork configured for parallel execution, so this misconfiguration fails loudly in the offending lane instead of corrupting a run whose symptoms surface later in an unrelated test, and it tears down a node whose startup threw.
Contributor
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
harshach
approved these changes
Sep 22, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Describe your changes:
Fixes #33738
Integration tests were failing randomly in the merge queue while the same commit was green on
PR CI, and the failure landed in a different, unrelated suite each time.
CsvExportMultiNodeITwas running in the parallel lane, where it boots extra fullOpenMetadataservers inside the shared test JVM while 4 JUnit workers drive the primary app. Itis
@Tag("multi-node")and listed inintegrationTests.multiNodeTests, but unlike its threesiblings it was never added to an
isolated-tests<includes>or aparallel-tests<excludes>list — it appeared at exactly one line in that pom, while each sibling appeared 16 times. Its own
Javadoc names the hazard: "
SessionMultiNodeClusterstarts extra Dropwizard instances inside thisJVM, so the nodes share a database ... but also share a filesystem and JVM statics."
The tag backstop that should have caught the omission was inert: in
parallel-tests,<excludedGroups>scale</excludedGroups>sat inside<systemPropertyVariables>where failsafe neverreads it — a mistake the pom already documents at lines 1502-1505 and gets right in
search-itandui-it. The other 7parallel-testsexecutions had noexcludedGroupsat all.Those extra nodes are what produced both reported failures. The lifecycle-dispatcher NPE
(
handler is null) came from each node'sSearchRepositoryconstructor mutating the process-globalhandler list — that mechanism is already fixed by #33712, but not its trigger. The Quartz failure
came from every booting node running
initializeEventSubscriptions()against the same clustered jobstore, colliding with the test's own PATCH on the same trigger keys.
Type of change:
High-level design:
Two independent guards against the lane leak.
CsvExportMultiNodeITis added to all 8isolated-tests<includes>and all 8parallel-tests<excludes>, and<excludedGroups>ismoved to a direct
<configuration>child in everyparallel-testsexecution asscale,multi-node, with all four multi-node classes tagged@Tag("multi-node"). The filenamelists are the explicit statement; the tag filter is what keeps the next multi-node suite out when
someone forgets them. All four classes are now consistent across tag, lane property, and both lists.
The Quartz race is fixed rather than avoided, because it is reachable outside tests: every node
runs
EventSubscriptionResource.initialize()→initializeEventSubscriptions()on startup againstone clustered job store, so a rolling restart hits the same window.
QuartzScheduler.deleteJoblists a job's triggers and then unschedules them in separateJobStoreTXtransactions (verified against the 2.5.0-rc2 bytecode), and throws when a trigger itjust listed is already gone — which is the state being asked for, not a failure. So:
scheduleJob(jobDetail, Set.of(trigger), true)instead of delete-then-add. That is strictlybetter than making delete-then-add safe: it also removes the window in which the alert is not
scheduled at all, and the
ObjectAlreadyExistsExceptionrace on the add side.deleteJobfinds nothing left to unschedule, anda lost race is accepted once
checkExistsconfirms the job is gone (bounded to 3 attempts so agenuinely stuck job store still errors rather than looping).
Catching and ignoring the
SchedulerExceptionwas rejected: it would have hidden a real job-storefailure behind the same code path, and left the unscheduled window open.
Fail loudly rather than corrupt silently.
SessionMultiNodeCluster.getInstance()now refuses tostart when
junit.jupiter.execution.parallel.enabledis set, naming the four places a multi-nodeclass must be registered. A recurrence becomes an immediate, self-describing error in the offending
lane instead of a corrupted run whose symptoms surface an hour later somewhere else. It also tears
down a node whose startup threw —
startNode()hands the app toregisterAdditionalApponly onsuccess, so such a node would otherwise never be stopped.
Tests:
Use cases covered
and by a runtime guard)
Unit tests
differs under a real clustered
JobStoreTXagainst a database; a mockedSchedulerwouldassert the call shape rather than the race, which is what the integration test below covers.
Backend integration tests
test_concurrentEnableDisableSubscriptiontoEventSubscriptionResourceIT— 4 threads× 5 toggles on one subscription. It tolerates version conflicts between racing PATCHes
(legitimate, client errors) and fails on any 5xx or
unschedule triggermessage, so ittargets the defect exactly and cannot false-fail.
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
Lane membership was verified to be consistent for all four multi-node classes (tag,
multiNodeTests, 8 includes, 8 excludes each).Not run locally: the integration suites themselves, which need the Docker testcontainers stack;
relying on CI for those.
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #33738above.🤖 Generated with Claude Code
The PR is not yet safe to merge because scheduler deletion can report success while leaving an alert job active, and the explicit Java method-size requirement must also be satisfied.
Findings
Summary
This PR separates multi-node integration suites from parallel test forks and reconciles Quartz alert schedules from committed subscription state.
Diagram
sequenceDiagram participant API as Subscription API participant DB as Metadata DB participant Sync as Scheduler Reconcile participant Q as Clustered Quartz API->>DB: Commit subscription mutation API->>Sync: Reconcile subscription ID Sync->>DB: Read committed subscription alt enabled Sync->>Q: Replace job and trigger atomically else disabled or deleted Sync->>Q: Unschedule trigger Sync->>Q: Delete job Q--xSync: SchedulerException Note over Sync,API: Current code suppresses the failure endReviews (2) · Last reviewed commit: "Order alert scheduling against committed..."