Skip to content

Fixes #29255: Remove unused LMAX Disruptor event bus and dependency#29256

Merged
harshach merged 1 commit into
mainfrom
harshach/lmax-disruptor-removal
Jun 22, 2026
Merged

Fixes #29255: Remove unused LMAX Disruptor event bus and dependency#29256
harshach merged 1 commit into
mainfrom
harshach/lmax-disruptor-removal

Conversation

@harshach

@harshach harshach commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #29255

I removed the LMAX Disruptor event bus (EventPubSub) and the com.lmax:disruptor dependency because it is dead code. Its only producer, EventPubSub.publish(ChangeEvent), has had zero callers since the change-event flow moved to the database-backed change_event consumer pattern in #14422audit_log is now written by AuditLogConsumer (a Quartz job polling change_event), so the disruptor's attached handlers (AuditLogEventPublisher, EventMonitorPublisher) never fired. This deletes the orphaned plumbing plus its now-unreferenced EventMonitor backends and strips the boot wiring from OpenMetadataApplication.

Type of change:

  • Improvement

High-level design:

  • The live path — ChangeEventHandlerchange_event table → AuditLogConsumer (Quartz) → AuditLogRepository.write()audit_log — is untouched.
  • Deleted EventPubSub, EventPublisher, AbstractEventPublisher, AuditLogEventPublisher, EventMonitorPublisher, and the orphaned EventMonitor / EventMonitorFactory / PrometheusEventMonitor / CloudwatchEventMonitor.
  • Kept EventMonitorConfiguration / EventMonitorProvider — still used by the Micrometer HTTP metrics filter and ServicesStatusJobHandler.
  • Backward compatibility: the CloudWatch/Prometheus ingestion-pipeline metric push was already non-functional (never fed by the disruptor), so no working behavior is lost. It is recoverable from git history if it needs re-wiring onto the change_event consumer.

Tests:

Unit tests

Removed 3 obsolete tests for the deleted classes (CloudWatchEventMonitorTest, EventMonitorFactoryTest, EventMonitorPublisherTest). No new logic was added — this is a pure dead-code removal.

Backend integration tests

  • Not applicable (no API behavior change). Existing AuditLogResourceIT continues to cover the live change_eventaudit_log path.

Manual testing performed

  1. mvn -pl openmetadata-service test-compile — passes (main + test sources compile clean).
  2. mvn -pl openmetadata-service spotless:apply — no formatting changes.
  3. Verified repo-wide that EventPubSub.publish has no callers and no remaining lmax/disruptor references.

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #29255 above.
  • For JSON Schema changes: not applicable (no schema changes).
  • For UI changes: not applicable (no UI changes).

Greptile Summary

Removes the LMAX Disruptor-based EventPubSub and all attached plumbing (EventPublisher, AbstractEventPublisher, AuditLogEventPublisher, EventMonitorPublisher, EventMonitor* backends) that have had zero live callers since the change-event flow moved to the database-backed change_event consumer pattern. The live audit-log path (ChangeEventHandlerchange_event table → AuditLogConsumer Quartz job → audit_log) is untouched.

  • Deletes EventPubSub, the six publisher/monitor classes, and their three unit tests; removes com.lmax:disruptor 3.4.4 from both pom.xml files.
  • Strips EventPubSub.start(), registerEventPublisher(), and EventPubSub.shutdown() from OpenMetadataApplication; keeps EventMonitorConfiguration and EventMonitorProvider, which are still consumed by ServicesStatusJobHandler and the Micrometer HTTP-metrics filter.

Confidence Score: 4/5

Safe to merge — purely removes dead code and its dependency; no live event path is touched.

The deletion is well-scoped and the live ChangeEventHandler → change_event → AuditLogConsumer → audit_log path is untouched. The only loose end is the software.amazon.awssdk:cloudwatch Maven artifact, which is now orphaned in openmetadata-service/pom.xml now that CloudwatchEventMonitor is gone — it adds unnecessary compile-time weight but does not break anything at runtime.

openmetadata-service/pom.xml — the CloudWatch AWS SDK dependency block should be removed alongside the deleted monitor class.

Important Files Changed

Filename Overview
openmetadata-service/pom.xml Removes the com.lmax:disruptor dependency; the software.amazon.awssdk:cloudwatch dependency is now orphaned and should also be removed.
openmetadata-service/src/main/java/org/openmetadata/service/OpenMetadataApplication.java Removes EventPubSub.start(), registerEventPublisher(), and EventPubSub.shutdown() boot wiring; live audit-log and event-subscription paths are untouched.
openmetadata-service/src/main/java/org/openmetadata/service/events/EventPubSub.java Deleted — LMAX Disruptor ring-buffer implementation with zero live callers.
openmetadata-service/src/main/java/org/openmetadata/service/monitoring/CloudwatchEventMonitor.java Deleted — the sole consumer of the CloudWatch AWS SDK; its removal leaves the cloudwatch Maven artifact orphaned.
pom.xml Removes com.lmax:disruptor 3.4.4 from the root BOM; no remaining references across the repository.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph removed["❌ Removed (dead code)"]
        EP["EventPubSub\n(LMAX Disruptor)"]
        ALEP["AuditLogEventPublisher"]
        EMP["EventMonitorPublisher"]
        EM["EventMonitor\n(CloudWatch / Prometheus)"]
        EP --> ALEP
        EP --> EMP
        EMP --> EM
    end

    subgraph live["✅ Live path (unchanged)"]
        CEH["ChangeEventHandler"]
        CE["change_event table"]
        ALC["AuditLogConsumer\n(Quartz job)"]
        AL["audit_log table"]
        CEH --> CE --> ALC --> AL
    end

    style removed fill:#fdd,stroke:#f66
    style live fill:#dfd,stroke:#6a6
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    subgraph removed["❌ Removed (dead code)"]
        EP["EventPubSub\n(LMAX Disruptor)"]
        ALEP["AuditLogEventPublisher"]
        EMP["EventMonitorPublisher"]
        EM["EventMonitor\n(CloudWatch / Prometheus)"]
        EP --> ALEP
        EP --> EMP
        EMP --> EM
    end

    subgraph live["✅ Live path (unchanged)"]
        CEH["ChangeEventHandler"]
        CE["change_event table"]
        ALC["AuditLogConsumer\n(Quartz job)"]
        AL["audit_log table"]
        CEH --> CE --> ALC --> AL
    end

    style removed fill:#fdd,stroke:#f66
    style live fill:#dfd,stroke:#6a6
Loading

Comments Outside Diff (1)

  1. openmetadata-service/pom.xml, line 551-557 (link)

    P2 The software.amazon.awssdk:cloudwatch artifact is now orphaned. Its only Java consumer was CloudwatchEventMonitor, which was deleted in this PR. No remaining source file under src/main/java imports any class from software.amazon.awssdk.services.cloudwatch.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "Fixes #29255: Remove unused LMAX Disrupt..." | Re-trigger Greptile

EventPubSub (LMAX Disruptor) was started and had two handlers attached
(AuditLogEventPublisher, EventMonitorPublisher), but its only producer —
EventPubSub.publish(ChangeEvent) — has zero callers since the change-event
flow moved to the database-backed change_event consumer pattern in #14422.
audit_log is written by AuditLogConsumer (Quartz, polls change_event), so
the disruptor handlers never fired.

Delete the dead disruptor machinery and its orphaned EventMonitor backends,
strip the wiring from OpenMetadataApplication, and drop the com.lmax:disruptor
dependency. EventMonitorConfiguration/EventMonitorProvider are retained
(used by the Micrometer HTTP metrics filter and ServicesStatusJobHandler).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Jun 20, 2026
@gitar-bot

gitar-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Removes the unused LMAX Disruptor event bus and its associated dependency, effectively cleaning up orphaned code paths. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (8 flaky)

✅ 4312 passed · ❌ 0 failed · 🟡 8 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 302 0 0 4
🟡 Shard 2 813 0 2 9
🟡 Shard 3 814 0 2 8
🟡 Shard 4 858 0 1 12
🟡 Shard 5 732 0 1 47
🟡 Shard 6 793 0 2 8
🟡 8 flaky test(s) (passed on retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/Glossary/GlossaryTermRelationsGraph.spec.ts › cross-glossary related term appears as a node in the Relations Graph (shard 2, 1 retry)
  • Features/SettingsNavigationPage.spec.ts › should save changes and navigate when "Save changes" is clicked in blocker (shard 3, 1 retry)
  • Flow/AddRoleAndAssignToUser.spec.ts › Verify assigned role to new user (shard 3, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for SearchIndex (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for apiEndpoint -> table (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify Impact Analysis service filter selection (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@harshach harshach merged commit c00091f into main Jun 22, 2026
66 of 72 checks passed
@harshach harshach deleted the harshach/lmax-disruptor-removal branch June 22, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unused LMAX Disruptor event bus (EventPubSub) and its dependency

2 participants