159 Commits

Author SHA1 Message Date
shown 7eee0fc366 fix(controller): detect inactive raft masters (#10885) 2026-08-13 15:46:06 +08:00
shown e47268e664 fix(controller): compare partial broker identities safely (#10886) 2026-08-13 10:06:22 +08:00
aias00 0e4ccf1b66 [ISSUE #10578] Fix master election maxOffset comparator overflow
DefaultElectPolicy sorted broker candidates by subtracting maxOffset values and casting the long delta to int. Large offset gaps can overflow the comparator result and rank a lower-offset broker first. This replaces subtraction with safe comparator helpers and adds a focused overflow regression test.

Constraint: Preserve existing election order: higher epoch, higher maxOffset, lower electionPriority

Rejected: Keep subtraction comparator | unsafe for long offset deltas greater than Integer.MAX_VALUE

Confidence: high

Scope-risk: narrow

Tested: mvn -q -pl controller -DskipTests=false -Dtest=DefaultElectPolicyTest -Djacoco.skip=true test

Tested: mvn -q -pl controller -DskipTests compile -Dspotbugs.skip=true -Dcheckstyle.skip=true

Tested: mvn -q -DskipTests compile -Dspotbugs.skip=true -Dcheckstyle.skip=true

Not-tested: Full controller suite on local JDK due existing JaCoCo/Hessian module-access failures

Related: #10578
2026-07-07 19:37:13 +08:00
Quan 10d498c68a [ISSUE-10546] Add default implementation for rejectRequest() in NettyRequestProcessor (#10547) 2026-06-25 10:22:35 +08:00
lizhimins 9443c6d9db [ISSUE #10383] Align Bazel dependencies with Maven pom.xml (#10404) 2026-05-29 10:04:20 +08:00
littleboy 71659e35f2 [ISSUE #8903] fix dledger mode expired message can not delete on jdk9+ (#9851) 2025-12-15 15:09:01 +08:00
Drizzle 7a08b4cb68 [RIP-82] Implement Timer message, transaction message, and index based on RocksDB (#9787)
* add isWakeCommitWhenPutMessage  for AIO

* Implemented Timer message, Transaction Message, Index based on rocksdb

* add timeline roll interval can be config

* optimize the code

* optimize the code

* add sone logic for recover commitlog

* optimize the code

* update

* update

* optimize the code

* update

* update

* optimize the code

* optimize the code

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

Change-Id: I700798ef625187ac32c16c8ea5aae5f2debfdddf

* update

Change-Id: I1d2dfa24317d2ad7c0ca41d90cd2b3c1ba260b0b

* update

Change-Id: I974e30eb909722ea2a17a14e505759bf20f4f860

* update

Change-Id: Ica01fbd08a2d60e9a0f4ab54b41ae4768cc4fa5d

* update

Change-Id: I764ce6cea3159b025bf1e6e65b60e20514cecb4f

* update

Change-Id: I0cc735896e1266934293ec06cb4f07746a1894a1

* update

Change-Id: I6538b6a60631c62e162bf511ae20185a07b72508

* update

Change-Id: I03f83b9e8199f3595ca28471df4a2e94671fbaae

* update

Change-Id: I5b19b671fa0b40cd2aba63f1d0eb654b92775cb4

* update the code

Change-Id: I22788d112b7f214310719e2d3ebad839ef818e67

* update

Change-Id: I7da89fe635b58ac5026095a8e484fa46f68521e7

* update the code

Change-Id: I5eade6c31803b8cf05c1a4bb83c226d57f4980c7

* update

Change-Id: Id67f600fad1a876926cd505dba047cc82011160c

* update

Change-Id: Ia4b0e2a21aa5e12570a80713432fd48ddfb210e6

* optimize the code

Change-Id: Idf8080c7b17c25e14fe34ef6bad1e1150dab58d6

* update

Change-Id: I904f0120a728b4eb87226159f9c0cde3d18ef26a

* update code

Change-Id: I21653d6bcad905daa8f10d12298d1d27535af9d9

* update

Change-Id: I712b9cde9a18c730fd020ea76f05560e594a9edd

* update

Change-Id: Iafe10c007e9b5057212e2dcfb21671f970b1d344

* update

Change-Id: I40c1c7f54852ee033e0caa22573436ee505a27b8

* optimize the code

Change-Id: Iae006b01608df4f363c63a0ae876dbf63cd56fbd

---------

Co-authored-by: drizzle.zk <drizzle.zk@alibaba-inc.com>
Co-authored-by: zhouli11 <04081337@163.com>
2025-12-11 15:13:56 +08:00
yx9o d7e27d6d69 [ISSUE #9396] Use fastjson2 in all modules (#9397)
* Use fastjson2 in all modules

* Update test

* Update test

* Update test

* Add serialization compatibility test tool class

* Update RemotingSerializableCompatTest.java

* Update RemotingSerializableCompatTest.java

* Update RemotingSerializableCompatTest.java

* Update BitSet problem

* Update

* Update

* Update test

* Update test

* Update BUILD.bazel

* Update BUILD.bazel

* Update test

* Update BitSet problem

* Add test

* Add compat test

* merge develop

* Update test

* merge develop
2025-12-04 19:09:08 +08:00
majialong 6d6921b473 [ISSUE #9687] Cleanup BrokerHeartbeatManager code (#9688) 2025-09-24 13:48:53 +08:00
Liu Shengzhong 8fc57f1468 [ISSUE #9717] Fix RaftBrokerHeartBeatManager#scanNotActiveBroker was not actually executed 2025-09-19 17:25:40 +08:00
cvictory 1c23a8094a [ISSUE #9663] Adopt Maven's revision mechanism (requires Maven >= 3.5.0) (#9665)
Co-authored-by: cvictory <shengli.caosl@alibaba-inc.com>
2025-09-04 09:51:02 +08:00
Hongxu Xu 7ab7ddd6d2 [ISSUE #9609] Fix bazel CI and reduce dependencies (#9610) 2025-08-22 16:35:39 +08:00
Crazylychee 4f9d292ee5 [ISSUE #9439] Add escape for win in the method returning broker configuration (#9440) 2025-06-05 17:09:13 +08:00
lizhimins aecb97ec44 [maven-release-plugin] prepare for next development iteration (#9389) 2025-05-07 16:34:04 +08:00
lizhimins 29d90a4ff9 [maven-release-plugin] prepare release rocketmq-all-5.3.3 (#9388) 2025-05-07 09:48:32 +08:00
lizhimins 47fe6b2ba6 [maven-release-plugin] prepare for next development iteration (#9232) 2025-03-08 17:20:49 +08:00
lizhimins 2baaf044ea [maven-release-plugin] prepare release rocketmq-all-5.3.2 (#9231) 2025-03-08 14:07:17 +08:00
luozongle01 b7a2a3dc39 [ISSUE #8769] Fix doc typo (#8770) 2024-09-29 09:54:15 +08:00
lizhimins daf3d1a666 [maven-release-plugin] prepare for next development iteration (#8750) 2024-09-26 09:33:52 +08:00
lizhimins b122c8109d [maven-release-plugin] prepare release rocketmq-all-5.3.1 (#8749) 2024-09-25 23:24:56 +08:00
dinglei cc484d5680 [ISSUE #8454] Active brokers number should be initailized to 1 in broker heartbeat manager. (#8453)
* active brokers should be 1 on computing if absent

* active brokers number should be initailized to 1 in broker heartbeat manager.
2024-07-28 17:12:59 +08:00
lizhimins 5dc0c6a8b5 [maven-release-plugin] prepare for next development iteration (#8382) 2024-07-09 01:30:43 +08:00
lizhimins 7ee50ec32e [maven-release-plugin] prepare release rocketmq-all-5.3.0 (#8379) 2024-07-08 23:15:33 +08:00
cnScarb a15088cbd3 [ISSUE #8096] fix log placeholder 2024-05-07 09:49:43 +08:00
rongtong f41160210a [maven-release-plugin] prepare for next development iteration (#7828) 2024-02-12 11:07:03 +08:00
rongtong 281a7b32f0 [maven-release-plugin] prepare release rocketmq-all-5.2.0 (#7827) 2024-02-11 17:53:50 +08:00
bazelisky af1936d93a [ISSUE #7715] Update Bazel toolchain to make the CI work (#7714)
* Update bazel toolchain

Signed-off-by: Bazelisky <bazelisk@hotmail.com>

* fix a bad test case as it violates requirement of ConcurrentHashMap#computeIfAbsent

Signed-off-by: Bazelisky <bazelisk@hotmail.com>

* Exclude flaky tests from test suite

Signed-off-by: bazelisky <155456828+bazelisky@users.noreply.github.com>

* fix: format issue

Signed-off-by: Zhanhui Li <lizhanhui@gmail.com>

* fix: Remove unused import

* fix deps issue

Signed-off-by: Zhanhui Li <lizhanhui@gmail.com>

* Expose data property of java_test, allowing to specify run_file

Signed-off-by: Zhanhui Li <lizhanhui@gmail.com>

---------

Signed-off-by: Bazelisky <bazelisk@hotmail.com>
Signed-off-by: bazelisky <155456828+bazelisky@users.noreply.github.com>
Signed-off-by: Zhanhui Li <lizhanhui@gmail.com>
Co-authored-by: Zhanhui Li <lizhanhui@gmail.com>
2024-02-01 16:52:55 +08:00
yulangz 8df53dfde8 [ISSUE #7300] jRaft-Controller Implemention (#7301)
* jRaft-Controller Implemention

* fix bazel build

* reformat code

* remove fury dependence

* fix bazel build

* resolve conflict

* clear code

* Optimize code style

* Optimize code style

* Optimize code style

* revert style only change
fix code style
rollback an unexpected modification.

* Update Producer.java

* chore: move raft startup to start method

* chore: use jraftconfig to collect all configs about jraft

* fix: fix wrong store path because init use string constant

* fix: fix CONTROLLER_NOT_LEADER error in follower

* chore: seperate jraft and controller log

* chore: fix conflict with develop

* chore: add comment to clear the filter logic

* feat: triggerElectMaster will retry when failed

* feat: when controller all restart, we use a timestamp to trace the first heartbeat, avoid to elect again

* fix: implements Serializable to enable snapshot serialize

* fix: use for loop to simple the elect retry

* chore: update jraft version

* chore: opt import

---------

Co-authored-by: leizhiyuan <leizhiyuan@gmail.com>
2024-01-29 20:45:20 +08:00
dinglei 9cfe724e6a Add validation in broker/namesrv configure updating command (#7584)
* Add validation for keys in black list in mqadmin command.

* Cancel validation for keys in black list in putKV command.
2023-11-28 10:04:17 +08:00
Zhouxiang Zhan 2043dd5034 [ISSUE #7493] Introduce a new event NettyEventType.ACTIVE (#7494)
* [ISSUE #7493] Introduce a new event NettyEventType.ACTIVE for ChannelEventListener

* introduce a new event NettyEventType.ACTIVE,

* implement channelActive interface for NettyRemotingClient#NettyConnectManageHandler

* add onChannelActive for ChannelEventListener interface.

* Move send heartbeat to onChannelActive
2023-10-24 10:29:43 +08:00
Lei Sun 28427d4012 [ISSUE #7425] Add RoccketmqControllerConsole log to fix bug (#7458) 2023-10-13 13:42:27 +08:00
rongtong b18e564add [ISSUE #7431] Fix flaky test of DLedgerControllerTest#testBrokerLifecycleListener (#7432)
* Fix flaky test of DLedgerControllerTest#testBrokerLifecycleListener
2023-10-09 21:43:01 +08:00
lk 73b3fde837 [maven-release-plugin] prepare for next development iteration (#7379) 2023-09-22 10:08:59 +08:00
lk 1a681bdf9b [maven-release-plugin] prepare release rocketmq-all-5.1.4 (#7377) 2023-09-21 19:58:29 +08:00
Jixiang Jin b8610d87bb Replace loggingMetricExporter with OtlpJsonLoggingMetricExporter. (#7373)
* Replace loggingMetricExporter with OtlpJsonLoggingMetricExporter.

* Fix bazel workspace

* Move OtlpJsonLoggingMetricExporter to proxy and controller.

* Fix Bazel imports.
2023-09-21 16:21:44 +08:00
guyinyou c100d815d7 [ISSUE #7328] Convergent thread pool creation (#7329)
* Convergence thread pool creation to facilitate subsequent iteration management

* Convergence thread pool creation in ThreadPoolMonitor.java

* fix unit test

* Convergence ThreadPool constructor

* Convergence ScheduledThreadPool constructor

* remove unused import

* Convergence ScheduledThreadPool constructor

* remove unused import

---------
2023-09-11 10:13:56 +08:00
rongtong 628020537f [ISSUE #7293] Fix NPE when alter sync state set 2023-09-07 16:17:47 +08:00
Jixiang Jin 50d1050437 To config the cardinalityLimit for openTelemetry metrics exporting and fix logging config for metrics (#7196) 2023-08-16 21:15:00 +08:00
rongtong e369d7deac [maven-release-plugin] prepare for next development iteration (#6939) 2023-06-24 14:31:42 +08:00
rongtong f7425f52f9 [maven-release-plugin] prepare release rocketmq-all-5.1.3 (#6938) 2023-06-24 12:23:11 +08:00
rongtong ad4cc957fb [maven-release-plugin] prepare for next development iteration (#6895) 2023-06-12 19:12:25 +08:00
rongtong 749967baa8 [maven-release-plugin] prepare release rocketmq-all-5.1.2 (#6892) 2023-06-12 17:44:39 +08:00
TheR1sing3un c68fb8f1b9 [ISSUE #6845] Build controller with bazel (#6846) 2023-06-01 13:42:52 +08:00
TheR1sing3un 529976f8fb [ISSUE #6777] Support metric in controller (#6778)
* feat(controller): build metrics framework in controller module

1. build metrics framework in controller module

* feat(controller): record metrics about controller

1. record metrics about controller

* fix(controller): fix after review

1. fix after review

Closes https://github.com/apache/rocketmq/issues/6777

* fix(controller): fix after review

1. fix lack of dependency

Closes https://github.com/apache/rocketmq/issues/6777
2023-05-30 14:17:59 +08:00
rongtong 8aea26ef8f [maven-release-plugin] prepare for next development iteration 2023-05-15 19:48:34 +08:00
rongtong e244ebb99a [maven-release-plugin] prepare release rocketmq-all-5.1.1 (#6763) 2023-05-15 18:51:01 +08:00
rongtong 9d411cf04a Make configPath unable to update at runtime (#6733)
* Make configPath unable to update at runtime

* Make configPath unable to update at runtime

* Add ASF header

* Add ASF header

* Pass the check style

* Polish the response code

* Polish the response code
2023-05-11 18:01:29 +08:00
Robin Han b3868ab606 (fix): logback config path seperator and brokerLogDir default value m… (#6590)
* (fix): logback config path seperator and brokerLogDir default value missing

* (fix): replace / with file.seperator in proxy test logback config

---------

Co-authored-by: Robin Han <robin@Robindendiannao.lan>
2023-04-18 16:48:34 +08:00
hiyo 0faa0a2c7d [ISSUE #6414] polish MQClientAPIImpl.getDefaultTopicRouteInfoFromName… (#6452)
* [ISSUE #6414] polish MQClientAPIImpl.getDefaultTopicRouteInfoFromNameServer parameters

* Fix to make Bazel CI pass

Signed-off-by: Li Zhanhui <lizhanhui@gmail.com>

* Fix typo

Signed-off-by: Li Zhanhui <lizhanhui@gmail.com>

---------

Signed-off-by: Li Zhanhui <lizhanhui@gmail.com>
Co-authored-by: Li Zhanhui <lizhanhui@gmail.com>
2023-03-23 20:30:21 +08:00
TheR1sing3un 1e2a301266 [ISSUE #6382] Periodically check for inactive masters (#6383)
* feat(controller): concurrent protect ReplicasInfoManager#replicaInfoTable and ReplicasInfoManager#syncStateSetInfoTable

1. concurrent protect ReplicasInfoManager#replicaInfoTable and
ReplicasInfoManager#syncStateSetInfoTable

* docs(controller): make statemachine thread-safe and support timed checking inactive master in each broker-set

1. make statemachine thread-safe
2. support timed checking inactive
master in each broker-set

* fix(controller): Add some logic when visit the BrokerReplicaInfo to avoid NPE

1. Add some logic when visit the BrokerReplicaInfo to avoid NPE

* test(controller): polish some test logic

1. polish some test logic

* fix(controller): Revise back the ControllerConfig#controllerStorePath to avoid the Incompatibility problems

1. Revise back the ControllerConfig#controllerStorePath to avoid the
Incompatibility problems
2023-03-21 13:59:53 +08:00