Commit Graph
222 Commits
Author SHA1 Message Date
Lin ZiHaoand林子豪 8b5853d0c3 [ISSUE #6263] use true address from channel
Co-authored-by: 林子豪 <zihao.lin@shopcider.com>
2023-03-28 10:43:20 +08:00
Ji JuntaoandLi Zhanhui 1818c2d507 [ISSUE #4890] BugFix: fix binary search consume offset by time (#6429)
* BugFix: fix binary search consume offset by time

* polish codes.

* modify the test case: when timestamp is skewing, only find lower bound.

* modify the test case: when timestamp is skewing, only find lower bound.

* modify the test case: when timestamp is skewing, only find lower bound.

---------

Co-authored-by: Li Zhanhui <shutian.lzh@alibaba-inc.com>
2023-03-24 10:15:41 +08:00
Ruantihong c5fec3af41 [ISSUE #6402]opt transaction message check (#6401)
* If you specify a custom first check time CheckImmunityTimeInSeconds,And the commit/rollback request whose validity period exceeds CheckImmunityTimeInSeconds and is not checked back will be processed and failed

* remove useless code

* update transactionCheckInterval default to be 30s
2023-03-21 13:40:34 +08:00
Ji Juntao cafc9ac3de [ISSUE #6421] Fix the encode bug. 2023-03-21 13:38:00 +08:00
Ji Juntao f1e02e8947 [ISSUE #6392] GetSyncStateSet prints replica's alive status (#6393)
* print replica's alive status

* refactor

* rename getIsAlive-getAlive and setIsAlive-setAlive.
2023-03-20 13:53:07 +08:00
Ji Juntao 63a014b810 [ISSUE#6342] Local SyncStatSet sync to remote value when changeToMaster (#6352)
* fix ISSUE#6342

* refactor

* correct the syncStateSet in elect process.

* move syncStateSet into request/response's body.

* optimize the broker electing switch's branch.
2023-03-16 11:48:04 +08:00
mxsm 22a7ec6b63 [ISSUE #6333] Simplify the logic of the FilterAPI#buildSubscriptionData method (#6334) 2023-03-14 11:23:51 +08:00
TheR1sing3un c94c65b691 fix(admin): fix incompatible command: CleanBrokerMeta
1. fix incompatible command: CleanBrokerMeta
2023-03-14 09:40:15 +08:00
RongtongJin 28618e95ab Polish the code structure and code style 2023-03-14 09:40:15 +08:00
TheR1sing3un c494a43c52 refactor(controller): optimize some code suggested by reviewer
1. optimize some code suggested by reviewer
2023-03-14 09:40:15 +08:00
+6 3a69aae701 [ISSUE #6023] Add a unit test to verify new register process in broker with controller mode (#6024)
* refactor: simplify getPID (#5962)

* [ISSUE #5923] Add example tiered storage backend service provider (#5926)

* implement example file segment

* add metrics

* add readme

* fix license

* fix tests

* fix links in README.md

* add comment to PosixFileSegment and mark as experimental

* fix test

* optimize image quality

* Remove the useless exception class: MQRedirectException #5963

* [ISSUE #5965] Fix lmqTopicQueueTable initialization (#5968)

* [ISSUE #5965] Fix lmqTopicQueueTable initialization

* [ISSUE #5965] Fix lmqTopicQueueTable initialization

* [ISSUE #5890] Fix dledger logging (#5959)

* Fix dledger logging

* Add bridge into store module

* [ISSUE #5860] Set the value of order when create or update topic (#5861)

* [ISSUE #5939]Adjust the MQClientInstance#sendHeartbeatToAllBroker catch code block log print level from info to warn (#5940)

* [ISSUE #5924] Optimize UtilAll#sleep method (#5925)

* [ISSUE #5924]Optimize UtilAll#sleep method

* polish code

* [ISSUE #5986] optimize the BrokerOuterAPITest class code

Co-authored-by: zhouyunpeng <2474138779@qq.com>

* [ISSUE #5971] Make the internal logs related to the dledger in the controller print to a file separately (#5972)

* Make the internal logs related to the dledger in the controller print to a file separately

* Make the internal logs related to the dledger in the controller print to a file separately

* [ISSUE #5969] Remvoe duplicate deleteUnusedStats in admin processor (#5973)

* [ISSUE #5847] Add checkBlock for hasMsgFromQueue

* [ISSUE #5983] Make consumer support flow control code better (#5984)

* When encountering the flow control code, pull it after 20ms instead of 3s

* When encountering the flow control code, pull it after 20ms instead of 3s

* [ISSUE #5896] feat:add pop consumer example (#5991)

* feat:add pop consumer

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* Update example/src/main/java/org/apache/rocketmq/example/simple/PushConsumer.java

Co-authored-by: Oliver <wqdyxnbd@163.com>

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

* feat:fix

---------

Co-authored-by: mahaitao617 <mahaitao617@mahaitao617deMacBook-Pro.local>
Co-authored-by: Oliver <wqdyxnbd@163.com>

* [ISSUE #5942] Fix the produce count include the quantity of the system topic(#5943)

* [ISSUE #5999] Fix the TopicQueueMappingUtils comments typo (#6000)

* [ISSUE #5996] Optimize the RemotingSerializable class code (#5998)

* simplified RemotingSerializable null check

* optimize the RemotingSerializable class code

* [ISSUE #5994] [RIP-46] add pop and timer metrics (#5995)

* add pop and timer metrics
* fix according to review comment

* test(broker): add ReplicasManagerRegisterTest to test the register process

1. add ReplicasManagerRegisterTest to test the register process

* chore(pom): modify pom.xml to replace mockito with powermock

1. modify pom.xml to replace mockito with powermock

* build(bazel): export powermock in bazel

1. export powermock in bazel

---------

Co-authored-by: Xinda <xdshent@gmail.com>
Co-authored-by: SSpirits <admin@lv5.moe>
Co-authored-by: loboxu <loboxu@tencent.com>
Co-authored-by: pingww <pingw002@gmail.com>
Co-authored-by: Aaron Ai <yangkun.ayk@gmail.com>
Co-authored-by: Slideee <yechun@corp.netease.com>
Co-authored-by: mxsm <ljbmxsm@gmail.com>
Co-authored-by: hardyfish <85128645+hardyfish@users.noreply.github.com>
Co-authored-by: zhouyunpeng <2474138779@qq.com>
Co-authored-by: rongtong <jinrongtong5@163.com>
Co-authored-by: zhiliatom <87265072+zhiliatom@users.noreply.github.com>
Co-authored-by: zhouxiang <zhouxiang.zzx@alibaba-inc.com>
Co-authored-by: mahaitao <15828010639@163.com>
Co-authored-by: mahaitao617 <mahaitao617@mahaitao617deMacBook-Pro.local>
Co-authored-by: Oliver <wqdyxnbd@163.com>
2023-03-14 09:40:15 +08:00
TheR1sing3un 03d6ba23e4 style(controller): remove unused import
1. remove unused import
2023-03-14 09:40:15 +08:00
TheR1sing3un f843851788 fix(controller): fix some bug to pass AutoSwitchRoleIntegrationTest
1. fix some bug to pass AutoSwitchRoleIntegrationTest
2023-03-14 09:40:15 +08:00
TheR1sing3un b97801c855 feat(controller): Improved logic and adaptation testing for persistent broker id versions
1. Improved logic and adaptation testing for persistent broker id versions
2023-03-14 09:40:15 +08:00
TheR1sing3un d7cac1582e feat(controller): implement the general register to controller protocol in controller side
1. implement the general register to controller protocol in controller
side
2023-03-14 09:40:15 +08:00
TheR1sing3un cfdfa0ea51 feat(broker): implement the general register to controller protocol
1. implement the general register to controller protocol
2023-03-14 09:40:15 +08:00
TheR1sing3un 9577aacbc0 feat(controller): add protocols about new register flow
1. add protocols about new register flow
2023-03-14 09:40:15 +08:00
TheR1sing3un e38ea9510a feat(controller): refactor broker's information recording core from ip address to broker id
1. refactor broker's information recording core from ip address to broker id
2023-03-14 09:40:15 +08:00
TheR1sing3un a1de567e11 [ISSUE#5045] Refactor the register and elect-master process in controller mode (#5046)
* refactor(controller): refactor the register logic

1. refactor the register logic

* refactor(controller): remove unused field in ElectMasterEvent

1. remove unused field in ElectMasterEvent

* feat(controller): add a tryElectMaster request and process logic about it

1. add a tryElectMaster request and process logic about it

* feat(controller): refactor ReplicasInfoManagerTest

1. refactor ReplicasInfoManagerTest

* refactor(controller): refactor DLedgerControllerTest

1. refactor DLedgerControllerTest

* refactor(controller): refactor ControllerManagerTest

1. refactor ControllerManagerTest

* refactor(controller): refactor ReplicasInfoManagerTest

1. refactor ReplicasInfoManagerTest

* refactor(controller): refactor register process and pass the junit test

1. refactor ReplicasInfoManagerTest

* style(broker): rename a constant

1. rename a constant

* feat(controller): update the DLedger dependency from v0.27 to v0.30

1. update the DLedger dependency from v0.27 to v0.30

* style(controller): add a white-line just for trigger GitHub action again

1. add a white-line just for trigger GitHub action again

* feat(controller): combine electMaster api and brokerTryElectMaster api

1. combine electMaster api and brokerTryElectMaster api

* feat(controller): add a logic about verifying the broker id returned from registering

1. add a logic about verifying the broker id returned from registering

* fix(controller): remove unused code and add a warning log in ControllerManager

1. remove unused code and add a warning log in ControllerManager

* fix: resolve conflicts

1. resolve conflicts

* fix(controller): remove unused class

1. remove unused class

* fix(controller): Resolve conflicts after merging

1. Resolve conflicts after merging

* refactor(controller): Refactor ReplicasInfoManager#elect

1. Refactor ReplicasInfoManager#elect

* style(controller): remove unused imports

1. remove unused imports

* style(controller): remove unused imports

1. remove unused imports

* fix(controller): resolve conflicts after merging develop branch

1. resolve conflicts after merging develop branch

* rerun

* fix(controller): resolve conflicts in ReplicasInfoManagerTest#testRegisterNewBroker after merging develop branch

1. resolve conflicts in ReplicasInfoManagerTest#testRegisterNewBroker after merging develop branch

* style(controller): pass style check

1. pass style check
2023-03-14 09:40:15 +08:00
hardyfish 5c45294c45 [ISSUE #6189] Replace ThreadFactory create (#6190)
* Replace ThreadFactory create

* delete unnecessary imports

* remove useless import

* reformat code
2023-03-08 20:24:30 +08:00
Zhouxiang Zhan 1986c6bdf9 [ISSUE #6207] Use static subscription to calculate consumer lag and latency
* Fix retryTopicPerm in ConsumerLagCalculator

* [ISSUE #6206] Use static subscription to calculate consumer lag and latency

* Add version for SimpleSubscriptionData

* Fix hashcode and equals for SubscriptionGroupConfig

* remove brokerId in equal and hashcode method

* Add getter setter for version

* fix consumerGroupInfo and getSubscriptionDataSet npe
2023-03-08 15:47:20 +08:00
hardyfish 33371e5d8e [ISSUE #6145] Modify Collections.sort usage (#6146)
* modify Collections.sort usage

* modify Collections.sort usage
2023-02-28 13:56:03 +08:00
loboxu 3bdab84c58 Optimize the timer implementation in Remoting 2023-02-27 12:46:22 +08:00
loboxu aeebe5e97b Optimize the timer implementation in Remoting 2023-02-27 12:46:22 +08:00
loboxu f1adb115c3 Optimize the timer implementation in Remoting 2023-02-27 12:46:22 +08:00
loboxu e3a591b483 raplace HashedWheelTimer 2023-02-27 12:46:22 +08:00
mxsm d6310dfdad [ISSUE #6117] Optimize NettyRemotingServer EventLoopGroup create (#6118) 2023-02-27 11:41:29 +08:00
echooymxq 527350decf Polish the unified remoting logger name. 2023-02-23 15:10:35 +08:00
hardyfish bf11311135 [ISSUE #6057] Modify magic number code 2023-02-23 11:50:35 +08:00
yuz10 70a5675e2e [ISSUE #6138] Skip log empty remoting code distribution (#6136)
* skip log empty code distribution

* skip log empty remoting code distirbution

* skip log empty code distribusion
2023-02-21 15:09:21 +08:00
mxsm 3f14b2bbd2 [ISSUE #5947] Optimize RouteInfoManager#pickupTopicRouteData create BrokerData code (#5948) 2023-02-16 10:46:56 +08:00
SSpirits 6c04852955 minor improvement for logs and metrics 2023-02-15 17:19:53 +08:00
rongtong abdf5dcb23 [ISSUE #6045] Fix the issue that the endoffset of entry obtained by getBrokerEpoch is incorrect (#6049)
* Fix the issue that the endoffset of entry obtained by getBrokerEpoch is incorrect

* Fix the issue that the endoffset of entry obtained by getBrokerEpoch is incorrect
2023-02-14 10:08:23 +08:00
Xinda a17fd72828 [ISSUE #6055] refactor: replace loop with putAll and typo fix 2023-02-14 09:59:45 +08:00
Xinda 7bbb8aaa3a [ISSUE #6010]refactor: avoid redundant condition judgment in loop 2023-02-11 13:01:28 +08:00
hardyfish e47e3cdbb5 [ISSUE #5996] Optimize the RemotingSerializable class code (#5998)
* simplified RemotingSerializable null check

* optimize the RemotingSerializable class code
2023-02-08 09:55:39 +08:00
mxsm 4ca7e79367 [ISSUE #5999] Fix the TopicQueueMappingUtils comments typo (#6000) 2023-02-07 13:45:38 +08:00
rongtong 1e7c861c1e [ISSUE #5929] Fix the issue that broker send heartbeat to controller frequently causing thread blocking when the network partition (#5930)
* Fix the issue that broker send heartbeat to controller frequently causing thread blocking when the network partition

* Fix the ReplicasManagerTest can not pass

* Reslove conflict with #5922

* Fix code style

* Rename isAddressCanConnect to isAddressReachable

* Rename isAddressCanConnect to isAddressReachable
2023-01-30 16:01:28 +08:00
mxsm 39dafc248a [ISSUE #5949] Remove TopicQueueMappingInfo class duplicate licenses (#5950) 2023-01-30 11:14:14 +08:00
rongtong 0ea930182c GetSyncStateSetSubCommand can also print that the broker is not in syncStateSet (#5935) 2023-01-28 10:08:51 +08:00
rongtong ae9f119431 [ISSUE #5916] Fix availableNamesrvAddrMap can not remove old nameserver address (#5917)
* Fix availableNamesrvAddrMap can not remove old nameserver address

* Fix availableNamesrvAddrMap can not remove old nameserver address

* Pass the code style
2023-01-28 08:54:17 +08:00
mxsm d070d467a6 [ISSUE #5802]Optimize HashMap and HasSet invoke resize method (#5803) 2023-01-03 10:32:36 +08:00
xiaoyifang e986534728 [ISSUE #5699] remove duplicate code definition of UtilAll.isBlank (#5700)
* [ISSUE #5699] remove duplicate code definition of UtilAll.isBlank

* [ISSUE #5699] remove duplicate code definition of UtilAll.isBlank
2022-12-29 15:17:58 +08:00
rongtong 646d04f425 [ISSUE #5712] Fix the invalid of heartbeat detection after controller switch (#5711)
* Fix the invalid of heartbeat detection after controller switch

* Pass the checkstyle

* Format ReplicasInfoManagerTest code style
2022-12-21 10:36:57 +08:00
mxsm 48848362d6 [ISSUE #5692] Polish Controller headers toString (#5693) 2022-12-14 17:42:50 +08:00
zhouxiang 561fc2e732 [ISSUE #5392] Remove unused method 2022-12-09 19:53:18 +08:00
kaiyi.lk 4c0e06749b [ISSUE #5486] polish MultiProtocolRemotingServer 2022-12-09 19:53:18 +08:00
SSpirits 7cab0a1aad [ISSUSE #5589] record subscription from request (#5590) 2022-12-07 17:26:00 +08:00
rongtong 6f49a1034d Enable AbortProcessException to interrupt RPCHook (#5594) 2022-11-25 20:35:20 +08:00
hzh0425 93e82c8205 [ISSUE #5569]Support broker priority election for controller mode (#5548)
* Support broker priority election for controller mode

* fix comment of brokerElectionPriority

* Set "The lower the value of brokerElectionPriority, the higher the priority of the broker being selected as the master."
2022-11-24 12:59:34 +08:00