Commit Graph
449 Commits
Author SHA1 Message Date
aa3feec4f5 [ISSUE #5254] Stream close optimization (#5255)
* Stream close optimization

* [ISSUE #5254] stream close optimization

* Fix check style violation by removing unused import

Co-authored-by: chenyong <chenyong@highlight.mobi>
Co-authored-by: Li Zhanhui <lizhanhui@gmail.com>
2022-10-09 16:00:46 +08:00
RapperCLandchenyong cb09cf0c02 [ISSUE #5236] Fix ServiceProvider loading class (#5237)
* fix duplicate class loading

* remove redundant

Co-authored-by: chenyong <chenyong@highlight.mobi>
2022-10-03 17:25:58 +08:00
Nowinkey b82531c432 style(common):Enable checkstyle for test code (#5215) 2022-09-29 10:27:42 +08:00
lizhiminsand斜阳 a3e596550d [ISSUE #5180] Support domain resolution to obtain the nameserver address (#5189)
* [ISSUE #5180] Support domain resolution to obtain the nameserver address

* [ISSUE #5180] Support domain resolution to obtain the nameserver address

Co-authored-by: 斜阳 <terrance.lzm@alibaba-inc.com>
2022-09-26 19:15:29 +08:00
zhoubo 251fc77957 Merge branch 'develop' into release-5.0.0 2022-09-23 10:28:18 +08:00
Panson aa330615f7 [ISSUE #4634] fix code style in namesrv module (#5159) 2022-09-22 10:07:28 +08:00
lizhimins 4fcacb60d0 [ISSUE #5095] Support output thread exception information to the error log (#5129) 2022-09-21 13:10:06 +08:00
TheR1sing3unandOliver 44aea94fdf [ISSUE#5039] localHostName() get stuck when constructing the BrokerIdentity object (#5110)
* fix(common): fix the issue#5039

1. fix the issue#5039 by init the local host name when BrokerIdentity
class loading to avoid the InetAddress#getLocalHost() be called too many
times.

* Update common/src/main/java/org/apache/rocketmq/common/BrokerIdentity.java

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

* fix(common): add import of StringUtils in class: BrokerIdentity

1. add import of StringUtils in class: BrokerIdentity

* rerun

Co-authored-by: Oliver <wqdyxnbd@163.com>
2022-09-20 13:40:54 +08:00
lizhimins b7bec238b9 [ISSUE #5091] Speed up broker initialization by concurrently loading ConsumeQueue (#5093) 2022-09-20 09:36:18 +08:00
hill ac82378aea [maven-release-plugin] prepare for next development iteration 2022-09-19 10:27:17 +08:00
hill f3e113cb1f [maven-release-plugin] prepare release rocketmq-all-5.0.0 2022-09-19 10:26:58 +08:00
Aaron Ai 1b011c1f50 [ISSUE #5108] Bump checkstyle to 3.2.0 (#5109)
* Bump checkstyle to 3.2.0

* Fix checkstyle
2022-09-19 10:10:29 +08:00
SSpirits afea709ac9 [ISSUE #5097] fix illegal reflective access (#5098) 2022-09-19 10:10:20 +08:00
Aaron Ai c185c60b0f [ISSUE #5108] Bump checkstyle to 3.2.0 (#5109)
* Bump checkstyle to 3.2.0

* Fix checkstyle
2022-09-18 11:17:36 +08:00
SSpirits 778513c563 [ISSUE #5097] fix illegal reflective access (#5098) 2022-09-16 18:11:22 +08:00
guyinyou 6efbe68241 [ISSUE #5066] Fix only individual queues are consumed in high tps scenarios (#5067) 2022-09-14 14:47:20 +08:00
mxsm 7067305aa6 [ISSUE #5036] Optimize controller module Response code (#5037) 2022-09-13 20:18:58 +08:00
mxsm ed9c775ee3 [ISSUE #4999] Optimize ConcurrentMap#computeIfAbsent performance on jdk1.8 a workaround (#5008) 2022-09-08 20:50:32 +08:00
zhangjidi2016andzhangjidi 10e8e6b8ae [ISSUE #4487]The trackType is wrong when the consumer in broadcasting subscription (#4981)
Co-authored-by: zhangjidi <zhangjidi@cmss.chinamobile.com>
2022-09-06 13:48:10 +08:00
8357cff101 [ISSUE #5002]Fix code style in any net modules. (#4989)
* optimize the memory usage in DefaultMappedFile:
use AtomicIntegerFieldUpdater instead of AtomicInteger

* fix code bug:
if the initial cursor of listIterator equals zero,
the previous element will always null.

* modify constant name

* fix excessive nesting

* Update client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java

* update maven-surefire-plugin.version from 2.19.1 to 2.22.1

* Revert "update maven-surefire-plugin.version from 2.19.1 to 2.22.1"

This reverts commit 37fabe6e78.

* Code Style: fix warn info from the code detector.

* fix checkstyle: not use '*' for import.

* Fix code style in any net modules.

* change method name from topicRouteDataIsChange to topicRouteDataChanged in TopicRouteData.java

* revert executeInvokeCallback method

* Fix grammar issues

Co-authored-by: shanpengyu <shanpengyu@bytedance.com>
Co-authored-by: Aaron Ai <yangkun.ayk@gmail.com>
Co-authored-by: Zhanhui Li <lizhanhui@apache.org>
2022-09-05 13:38:26 +08:00
echooymxq 7361de7854 Sort the property when persist config. (#4970) 2022-09-05 13:01:16 +08:00
Oliver 801639163d [ISSUE #4585] PlainPermissionManagerTest add unit test (#4637)
* [Issue #4585] Add unit test

* update path to support windows and not print SecretKey
2022-09-05 10:22:51 +08:00
lizhiboo 00780abb99 [ISSUE #4963] Prepare to release RocketMQ 5.0.0 version 2022-09-01 17:53:29 +08:00
74bae190d5 fix code style in MQClientInstance (#4961)
* optimize the memory usage in DefaultMappedFile:
use AtomicIntegerFieldUpdater instead of AtomicInteger

* fix code bug:
if the initial cursor of listIterator equals zero,
the previous element will always null.

* modify constant name

* fix excessive nesting

* Update client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java

* update maven-surefire-plugin.version from 2.19.1 to 2.22.1

* Revert "update maven-surefire-plugin.version from 2.19.1 to 2.22.1"

This reverts commit 37fabe6e78.

* Code Style: fix warn info from the code detector.

* fix checkstyle: not use '*' for import.

Co-authored-by: shanpengyu <shanpengyu@bytedance.com>
Co-authored-by: Aaron Ai <yangkun.ayk@gmail.com>
2022-09-01 11:20:24 +08:00
Aaron Ai 4661e58ebe [ISSUE #4934] Checking for violations as part of build (#4935)
* Checking for violations as part of build

* Extend await time for FileWatchServiceTest#watchTwoFiles_ModifyOne
2022-08-31 10:55:04 +08:00
Aaron Ai f23fdbe016 Replace findbugs by spotbugs (#4931) 2022-08-30 17:45:56 +08:00
Zhanhui Li a488a0c22d [ISSUE 4926]Fix FileWatchServiceTest (#4927)
* Fix FileWatchService

* Fix all warnings and optimize FileWatchService implementation

* Take spurious wakeup into account
2022-08-30 14:24:46 +08:00
Zhanhui Li aae7b37d04 [ISSUE 4915] Identify flaky tests (#4919)
* Rule out tests that are flaky. Aka they failed to pass 64 sequential  and concurrent runs

* Change default log root directory for tests

* Follow test encyclopedia

* Fix test cases, allowing OS pick up available port to listen to

* Add sha256

* Use pull_request
2022-08-29 19:52:53 +08:00
mxsm a961d1b44a [ISSUE #4817] Add a command to clear broker data from controller for CLI (#4823) 2022-08-27 19:42:55 +08:00
mxsm 0909aa91a2 [ISSUE #4857] Fix broker can't auto register to controller again (#4862) 2022-08-25 10:03:57 +08:00
Zhanhui Li 3da7ea9c1b [Infra Improvement] Build And Run Unit Tests in Parallel (#4878)
* Support build with Bazel (#4865)

* Support build with Bazel, fixing tests to make them capable of running in concurrency and hermetic.

* Make test cases capable of running in parallel. (#4874)
2022-08-24 20:53:30 +08:00
YangJodie 17634d3317 [ISSUE apache#4858] add consumer type check for message direct push 2022-08-23 18:52:10 +08:00
RongtongJin bbbb96e129 Revert "Support build with Bazel (#4865)"
This reverts commit ec8a93d2f7.
2022-08-23 14:29:46 +08:00
Zhanhui Li ec8a93d2f7 Support build with Bazel (#4865)
* Support build with Bazel, fixing tests to make them capable of running in concurrency and hermetic.
2022-08-23 13:11:53 +08:00
HuiTong b7f0162ffa fix thread-safety problem of admin tools (#4843) 2022-08-19 12:26:47 +08:00
TheR1sing3un c5f80713be [ISSUE #4813] Add elect policy for controller (#4809)
* feat(controller): add elect policy

1. add epoch and maxOffset in heartbeat.
2. refactor elect logic, now we
elect a new master by elect policy(can expand).
3. add some unit tests

* refactor(controller): refactor some code and format some code

1. refactor some code and format some code

* fix typo in ReplicasInfoManager

1. fix typo in ReplicasInfoManager

* fix wrong method call in ReplicasManagerTest#before

1.fix wrong method call in ReplicasManagerTest#before

* fix wrong call in ReplicasManagerTest#before

1. fix wrong call in ReplicasManagerTest#before

* fix(controller): fix the bug about ReElectMaster

1. fix the bug about ReElectMaster
2. fix some typo

* style(controller): fix typo by checkstyle

1. fix typo by checkstyle

* test(broker): fix invalid usage of "any()" in DLedegerControllerTest#before

1. fix invalid usage of "any()" in DLedegerControllerTest#before

* fix(controller): fix some wrong usage in test

1. fix some wrong usage in test
2. refactor some field type to avoid NPE
2022-08-16 08:41:51 +08:00
sunhangdaandsunhangda 0375027b70 [ISSUE #4382]Namesrv nearby route (#4383)
* fix:when broker is down,async send model can not retry

* fix Issue #3556

* fix Issue #3556

* fix Issue #3556

* fix Issue #3556

* async send model success retry when occurs Exception

* test case testSendMessageAsync_WithException

* modify test case testSendMessageAsync_WithException

* adding exception message with broker addr when occuring broker connect
timeout

* repair code style

* in async mode,set ThreadExecutorPool AbortPolicy

* Optimize asynchronous send timeout logic code

* Adjusting log information

* Delete SendMessageProcessor.java

* 恢复上一个版本

* namesrv nearby route

* Revert to previous version code

* add lisence header to Network.java

* code style

* 根据broker和client配置的标识返回路由信息

* Delete greetings.yml

* Delete .gitignore

* reset previous version

* reset to previous version

* code style

* Namesrv nearby route implements all by RPCHook

* reset to prevous version

* ServiceProvider return to original position

* Nearby route make the code clear

* revert to ori version

* reset to ori version

* reset to ori version

* reset to ori version

* Keep same as the official version

* Keep same as the official version

* Keep same as the official version

Co-authored-by: sunhangda <sunhangda@lixiang.com>
2022-08-11 17:31:45 +08:00
mxsm 06ca14a508 [ISSUE #4791] Add elect master command for admin CLI (#4798) 2022-08-11 10:06:46 +08:00
mxsm ce274265db [ISSUE #4794] Fix deserialize ElectMasterResponseHeader attribute value of brokerMemberGroup is null (#4796) 2022-08-08 17:11:14 +08:00
Ji Juntaoand傅冲 705e717a09 [ISSUE #4725] Optimize the CK/ACK 's invisibleTime in POP consumption mode. (#4753)
* Replace scheduled message in Pop with timer message.

* add unit test.

* refactor

* WIP

* improve unit test

* improve unit test

* improve unit test

* fix unnecessary stubbing problem.

* fix misspelling 'replase' in doc.

* refactor and rebuild

* fix the bug of #4702

Co-authored-by: 傅冲 <yubao.fyb@alibaba-inc.com>
2022-08-08 16:00:25 +08:00
Aaron Ai 61b14c3f4e [ISSUE #4785] Enable misspell check GitHub Action (#4786)
* Enable misspell check GitHub Action

* Fix typo
2022-08-08 09:28:41 +08:00
rongtong 0b6563b58f Add getControllerConfig and updateControllerConfig command for admin CLI (#4793) 2022-08-07 15:28:51 +08:00
rongtong 838854ffcd Remove useless GetRouteInfoRequestHeader.split constant to ensure compatibility (#4718) 2022-08-04 09:59:50 +08:00
mxsm 7cc5cf1fae [ISSUE #4748] Add attribute enableControllerInNamesrv to NamesrvConfig (#4760) 2022-08-02 08:50:56 +08:00
mxsmandAaron Ai b875b3309a [ISSUE #4709] fix method is on the same line as @Override annotation (#4717)
Co-authored-by: Aaron Ai <yangkun.ayk@gmail.com>
2022-08-01 20:42:34 +08:00
rongtong 1483d679d7 Merge branch 'develop' into develop-yy 2022-08-01 10:19:19 +08:00
wangfanandwangfan e8fd55bb01 [ISSUE #4257] Verify that the value of the permission is valid when updating the topic/broker config (#4498)
* [ISSUE #4257] Verify that the value of the permission is valid when updating the topic/broker config

* delete useless import

Co-authored-by: wangfan <wangfan8@xiaomi.com>
2022-07-31 16:40:29 +08:00
RongtongJin a9ab25439c Enable new timer message to adapt to ha switching and brokerContainer 2022-07-30 18:56:35 +08:00
Jixiang.jjx 1e410977a3 [ISSUE #3949] return acceptMessageTypes for quering topic route. 2022-07-26 16:29:51 +08:00
Lei Sun 8e90b5a7b9 Merge branch 'apache:develop' into develop 2022-07-24 12:35:31 +08:00