Skip to content

[ISSUE #10651] Adapt RocketMQ to latest DLedger and remove fastjson1 - #10947

Draft
RongtongJin wants to merge 7 commits into
developfrom
codex/dledger-latest-pr336-adapter
Draft

[ISSUE #10651] Adapt RocketMQ to latest DLedger and remove fastjson1#10947
RongtongJin wants to merge 7 commits into
developfrom
codex/dledger-latest-pr336-adapter

Conversation

@RongtongJin

Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Brief Description

This PR reworks the DLedger 0.3.3 adaptation on top of the latest DLedger code and openmessaging/dledger#336. It is intended to supersede the incomplete adaptation in #10650.

The change:

  • adapts RocketMQ broker, store, and controller code to the latest DLedger APIs;
  • restores immediate append positions required by RocketMQ through DLedger PR how to setDelayTimeLevel? #336;
  • derives the committed physical boundary from DLedger index metadata and prevents reads from exposing an uncommitted tail;
  • enables fast commit-index advancement and handles DLedger NOOP/control entries safely during append, reput, and abnormal recovery;
  • handles latest DLedger's ordinary AppendFuture result for a single-message batch and BatchAppendFuture for multi-message batches;
  • removes RocketMQ's fastjson1 dependency and aligns Maven/Bazel on fastjson2 2.0.64;
  • adds JDK 8 cold-start compatibility fixtures, focused store regressions, and a real three-broker failover/full-restart integration test.

The validated compatibility boundary is a coordinated full-stop upgrade. Mixed-version rolling upgrade and downgrade are not covered by this PR.

Important

This is intentionally a draft. The current DLedger coordinate, 0.3.3-pr336-f2-64-SNAPSHOT, is a locally built artifact from DLedger master + PR #336 + fastjson2 2.0.64. Before this PR can be merged, DLedger #336 must be merged and a publicly resolvable DLedger artifact must be published; this PR must then switch to that coordinate and rerun the matrix.

Related work: #10650, #10928, openmessaging/dledger#336.

How Did You Test This Change?

All Java verification used Amazon Corretto JDK 8.

  • DLedger PR how to setDelayTimeLevel? #336 regression: 6/6 tests passed; full DLedger reactor passed; RPC cold-start/network harness 3/3 passed.
  • RocketMQ focused Maven tests:
    • remoting compatibility: 5/5;
    • DLedger store regression suite: 8/8;
    • controller: 7/7;
    • broker DLedger integration tests: 2/2;
    • broker container DLedger lifecycle: 1/1.
  • RocketMQ full Maven clean test: 19/19 modules, 3,124 tests, 0 failures, 0 errors, 42 skipped.
  • Bazel affected build: 5 targets, 203 actions.
  • Bazel tests: remoting 5/5, store 8/8, controller 1/1, single-broker IT 1/1, three-broker IT 1/1.
  • Full-stop data compatibility fixture: DLedger 0.3.2 wrote 10 messages; latest code read all 10 before the first new append, then wrote/read message 11.
  • Final dependency/bytecode audit: 7 packaged JARs and 1,360 classes scanned; no fastjson1 dependency, JAR entry, or class constant remained.
  • git diff --check passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Upgrade DLedger to 0.3.3-SNAPSHOT

1 participant