You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/09/13 13:29:19 UTC
[GitHub] [rocketmq] caigy opened a new pull request, #5062: [ISSUE #5012] support escaping transactional messages
caigy opened a new pull request, #5062:
URL: https://github.com/apache/rocketmq/pull/5062
**Make sure set the target branch to `develop`**
## What is the purpose of the change
fix #5012
## Brief changelog
XX
## Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
- [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
- [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test` to make sure integration-test pass.
- [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] caigy commented on a diff in pull request #5062: [ISSUE #5012] support escaping transactional messages
Posted by GitBox <gi...@apache.org>.
caigy commented on code in PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#discussion_r972673068
##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java:
##########
@@ -187,6 +190,39 @@ public void check(long transactionTimeout, int transactionCheckMax,
}
}
+ if (BrokerRole.SLAVE.equals(this.transactionalMessageBridge.getBrokerController().getMessageStoreConfig().getBrokerRole())
+ && this.transactionalMessageBridge.getBrokerController().getMinBrokerIdInGroup()
+ == this.transactionalMessageBridge.getBrokerController().getBrokerIdentity().getBrokerId()
+ && this.transactionalMessageBridge.getBrokerController().getBrokerConfig().isEnableSlaveActingMaster()
Review Comment:
new order:
1. check EnableSlaveActingMaster first for default false;
2. check brokerId for only 1 broker meeting this condition in a cluster;
3. check broker role.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] caigy commented on a diff in pull request #5062: [ISSUE #5012] support escaping transactional messages
Posted by GitBox <gi...@apache.org>.
caigy commented on code in PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#discussion_r972671171
##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java:
##########
@@ -187,6 +190,39 @@ public void check(long transactionTimeout, int transactionCheckMax,
}
}
+ if (BrokerRole.SLAVE.equals(this.transactionalMessageBridge.getBrokerController().getMessageStoreConfig().getBrokerRole())
+ && this.transactionalMessageBridge.getBrokerController().getMinBrokerIdInGroup()
+ == this.transactionalMessageBridge.getBrokerController().getBrokerIdentity().getBrokerId()
+ && this.transactionalMessageBridge.getBrokerController().getBrokerConfig().isEnableSlaveActingMaster()
+ ) {
+ final MessageExtBrokerInner msgInner = this.transactionalMessageBridge.renewHalfMessageInner(msgExt);
+ final boolean isSuccess = this.transactionalMessageBridge.escapeMessage(msgInner);
+
+ if (isSuccess) {
+ escapeFailCnt = 0;
+ newOffset = i + 1;
+ i++;
+ } else {
+ System.out.printf("Escaping transactional message failed %s times! msgId(offsetId)=%s, UNIQ_KEY(transactionId)=%s",
+ escapeFailCnt + 1,
+ msgExt.getMsgId(),
+ msgExt.getUserProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX));
Review Comment:
removed
##########
test/src/test/java/org/apache/rocketmq/test/container/ContainerIntegrationTestBase.java:
##########
@@ -186,6 +187,7 @@ protected static void createTopicTo(BrokerController masterBroker, String topicN
try {
TopicConfig topicConfig = new TopicConfig(topicName, rqn, wqn, 6, 0);
defaultMQAdminExt.createAndUpdateTopicConfig(masterBroker.getBrokerAddr(), topicConfig);
+ System.out.println("Create topic " + topicName + " to " + masterBroker.getBrokerIdentity().getCanonicalName() + "@" + masterBroker.getBrokerAddr());
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] ShannonDing commented on a diff in pull request #5062: [ISSUE #5012] support escaping transactional messages
Posted by GitBox <gi...@apache.org>.
ShannonDing commented on code in PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#discussion_r971573138
##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java:
##########
@@ -187,6 +190,39 @@ public void check(long transactionTimeout, int transactionCheckMax,
}
}
+ if (BrokerRole.SLAVE.equals(this.transactionalMessageBridge.getBrokerController().getMessageStoreConfig().getBrokerRole())
+ && this.transactionalMessageBridge.getBrokerController().getMinBrokerIdInGroup()
+ == this.transactionalMessageBridge.getBrokerController().getBrokerIdentity().getBrokerId()
+ && this.transactionalMessageBridge.getBrokerController().getBrokerConfig().isEnableSlaveActingMaster()
Review Comment:
“EnableSlaveActingMaster” is default set to false. maybe it's better to let this condition checked at first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] RongtongJin merged pull request #5062: [ISSUE #5012] support escaping transactional messages
Posted by GitBox <gi...@apache.org>.
RongtongJin merged PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] caigy commented on a diff in pull request #5062: [ISSUE #5012] support escaping transactional messages
Posted by GitBox <gi...@apache.org>.
caigy commented on code in PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#discussion_r979648202
##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageBridge.java:
##########
@@ -346,4 +346,16 @@ public MessageExt lookMessageByOffset(final long commitLogOffset) {
public BrokerController getBrokerController() {
return brokerController;
}
+
+ public boolean escapeMessage(MessageExtBrokerInner messageInner) {
+ PutMessageResult putMessageResult = this.brokerController.getEscapeBridge().putMessage(messageInner);
+ if (putMessageResult != null
Review Comment:
Good idea~ Changed as you advised.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] Oliverwqcwrw commented on a diff in pull request #5062: [ISSUE #5012] support escaping transactional messages
Posted by GitBox <gi...@apache.org>.
Oliverwqcwrw commented on code in PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#discussion_r979488874
##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageBridge.java:
##########
@@ -346,4 +346,16 @@ public MessageExt lookMessageByOffset(final long commitLogOffset) {
public BrokerController getBrokerController() {
return brokerController;
}
+
+ public boolean escapeMessage(MessageExtBrokerInner messageInner) {
+ PutMessageResult putMessageResult = this.brokerController.getEscapeBridge().putMessage(messageInner);
+ if (putMessageResult != null
Review Comment:
how about use `org.apache.rocketmq.store.PutMessageResult#isOk` to verify whether success,
It's a little bit cleaner and it's consistent with everything else
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] RongtongJin commented on a diff in pull request #5062: [ISSUE #5012] support escaping transactional messages
Posted by GitBox <gi...@apache.org>.
RongtongJin commented on code in PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#discussion_r970272302
##########
broker/src/test/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageUtilTest.java:
##########
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.rocketmq.broker.transaction.queue;
+
+
+import org.apache.rocketmq.common.message.MessageAccessor;
+import org.apache.rocketmq.common.message.MessageConst;
+import org.apache.rocketmq.common.message.MessageExt;
+import org.apache.rocketmq.common.message.MessageExtBrokerInner;
+import org.apache.rocketmq.common.sysflag.MessageSysFlag;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+public class TransactionalMessageUtilTest {
Review Comment:
How about ignoring these tests? It proves the function's correctness, but it takes too much time and is not the core function, which affects the running time of the CI. IMO, just run these tests manually before the release.
##########
test/src/test/java/org/apache/rocketmq/test/container/ContainerIntegrationTestBase.java:
##########
@@ -186,6 +187,7 @@ protected static void createTopicTo(BrokerController masterBroker, String topicN
try {
TopicConfig topicConfig = new TopicConfig(topicName, rqn, wqn, 6, 0);
defaultMQAdminExt.createAndUpdateTopicConfig(masterBroker.getBrokerAddr(), topicConfig);
+ System.out.println("Create topic " + topicName + " to " + masterBroker.getBrokerIdentity().getCanonicalName() + "@" + masterBroker.getBrokerAddr());
Review Comment:
We should remove the useless System.out.println
##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java:
##########
@@ -187,6 +190,39 @@ public void check(long transactionTimeout, int transactionCheckMax,
}
}
+ if (BrokerRole.SLAVE.equals(this.transactionalMessageBridge.getBrokerController().getMessageStoreConfig().getBrokerRole())
+ && this.transactionalMessageBridge.getBrokerController().getMinBrokerIdInGroup()
+ == this.transactionalMessageBridge.getBrokerController().getBrokerIdentity().getBrokerId()
+ && this.transactionalMessageBridge.getBrokerController().getBrokerConfig().isEnableSlaveActingMaster()
+ ) {
+ final MessageExtBrokerInner msgInner = this.transactionalMessageBridge.renewHalfMessageInner(msgExt);
+ final boolean isSuccess = this.transactionalMessageBridge.escapeMessage(msgInner);
+
+ if (isSuccess) {
+ escapeFailCnt = 0;
+ newOffset = i + 1;
+ i++;
+ } else {
+ System.out.printf("Escaping transactional message failed %s times! msgId(offsetId)=%s, UNIQ_KEY(transactionId)=%s",
+ escapeFailCnt + 1,
+ msgExt.getMsgId(),
+ msgExt.getUserProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX));
Review Comment:
We should remove the useless System.out.printf
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] ShannonDing commented on a diff in pull request #5062: [ISSUE #5012] support escaping transactional messages
Posted by GitBox <gi...@apache.org>.
ShannonDing commented on code in PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#discussion_r971572422
##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java:
##########
@@ -187,6 +190,39 @@ public void check(long transactionTimeout, int transactionCheckMax,
}
}
+ if (BrokerRole.SLAVE.equals(this.transactionalMessageBridge.getBrokerController().getMessageStoreConfig().getBrokerRole())
+ && this.transactionalMessageBridge.getBrokerController().getMinBrokerIdInGroup()
+ == this.transactionalMessageBridge.getBrokerController().getBrokerIdentity().getBrokerId()
+ && this.transactionalMessageBridge.getBrokerController().getBrokerConfig().isEnableSlaveActingMaster()
+ ) {
+ final MessageExtBrokerInner msgInner = this.transactionalMessageBridge.renewHalfMessageInner(msgExt);
+ final boolean isSuccess = this.transactionalMessageBridge.escapeMessage(msgInner);
+
+ if (isSuccess) {
+ escapeFailCnt = 0;
+ newOffset = i + 1;
+ i++;
+ } else {
+ System.out.printf("Escaping transactional message failed %s times! msgId(offsetId)=%s, UNIQ_KEY(transactionId)=%s",
Review Comment:
better to remove stdout.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] RongtongJin commented on a diff in pull request #5062: [ISSUE #5012] support escaping transactional messages
Posted by GitBox <gi...@apache.org>.
RongtongJin commented on code in PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#discussion_r974793686
##########
broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:
##########
@@ -112,15 +113,21 @@ public PutMessageResult putMessage(MessageExtBrokerInner messageExt) {
}
private SendResult putMessageToRemoteBroker(MessageExtBrokerInner messageExt) {
- final TopicPublishInfo topicPublishInfo = this.brokerController.getTopicRouteInfoManager().tryToFindTopicPublishInfo(messageExt.getTopic());
+ final boolean isTransHalfMessage = TransactionalMessageUtil.buildHalfTopic().equals(messageExt.getTopic());
+ MessageExtBrokerInner messageToPut = messageExt;
+ if (isTransHalfMessage) {
+ messageToPut = TransactionalMessageUtil.buildTransactionalMessageFromHalfMessage(messageExt);
+ }
Review Comment:
How about moving this logic to the upper layer to make putMessageToRemoteBroker function purer?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] codecov-commenter commented on pull request #5062: [ISSUE #5012] support escaping transactional messages
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#issuecomment-1248962030
# [Codecov](https://codecov.io/gh/apache/rocketmq/pull/5062?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5062](https://codecov.io/gh/apache/rocketmq/pull/5062?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c5a8e34) into [develop](https://codecov.io/gh/apache/rocketmq/commit/d407ec679ac8a4e2e4b63d4033c10d0caba5f7bb?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d407ec6) will **increase** coverage by `0.00%`.
> The diff coverage is `29.62%`.
```diff
@@ Coverage Diff @@
## develop #5062 +/- ##
==========================================
Coverage 43.19% 43.20%
+ Complexity 7766 7765 -1
==========================================
Files 995 995
Lines 69153 69225 +72
Branches 9154 9163 +9
==========================================
+ Hits 29872 29910 +38
- Misses 35525 35554 +29
- Partials 3756 3761 +5
```
| [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/5062?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...etmq/broker/processor/EndTransactionProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/5062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL0VuZFRyYW5zYWN0aW9uUHJvY2Vzc29yLmphdmE=) | `45.91% <0.00%> (-5.50%)` | :arrow_down: |
| [...ocketmq/broker/processor/SendMessageProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/5062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1NlbmRNZXNzYWdlUHJvY2Vzc29yLmphdmE=) | `44.63% <0.00%> (ø)` | |
| [.../transaction/queue/TransactionalMessageBridge.java](https://codecov.io/gh/apache/rocketmq/pull/5062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvdHJhbnNhY3Rpb24vcXVldWUvVHJhbnNhY3Rpb25hbE1lc3NhZ2VCcmlkZ2UuamF2YQ==) | `73.62% <0.00%> (-2.95%)` | :arrow_down: |
| [...saction/queue/TransactionalMessageServiceImpl.java](https://codecov.io/gh/apache/rocketmq/pull/5062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvdHJhbnNhY3Rpb24vcXVldWUvVHJhbnNhY3Rpb25hbE1lc3NhZ2VTZXJ2aWNlSW1wbC5qYXZh) | `46.12% <4.54%> (-3.88%)` | :arrow_down: |
| [.../apache/rocketmq/broker/failover/EscapeBridge.java](https://codecov.io/gh/apache/rocketmq/pull/5062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvZmFpbG92ZXIvRXNjYXBlQnJpZGdlLmphdmE=) | `33.53% <20.00%> (+0.41%)` | :arrow_up: |
| [...er/transaction/queue/TransactionalMessageUtil.java](https://codecov.io/gh/apache/rocketmq/pull/5062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvdHJhbnNhY3Rpb24vcXVldWUvVHJhbnNhY3Rpb25hbE1lc3NhZ2VVdGlsLmphdmE=) | `88.88% <90.90%> (+8.88%)` | :arrow_up: |
| [...e/rocketmq/namesrv/routeinfo/RouteInfoManager.java](https://codecov.io/gh/apache/rocketmq/pull/5062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9yb3V0ZWluZm8vUm91dGVJbmZvTWFuYWdlci5qYXZh) | `63.98% <100.00%> (ø)` | |
| [...ache/rocketmq/common/stats/MomentStatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/5062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvTW9tZW50U3RhdHNJdGVtU2V0LmphdmE=) | `39.13% <0.00%> (-4.35%)` | :arrow_down: |
| [...a/org/apache/rocketmq/filter/util/BloomFilter.java](https://codecov.io/gh/apache/rocketmq/pull/5062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CbG9vbUZpbHRlci5qYXZh) | `60.43% <0.00%> (-2.20%)` | :arrow_down: |
| [...rocketmq/broker/processor/PopMessageProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/5062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1BvcE1lc3NhZ2VQcm9jZXNzb3IuamF2YQ==) | `37.63% <0.00%> (-0.54%)` | :arrow_down: |
| ... and [10 more](https://codecov.io/gh/apache/rocketmq/pull/5062/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] caigy commented on a diff in pull request #5062: [ISSUE #5012] support escaping transactional messages
Posted by GitBox <gi...@apache.org>.
caigy commented on code in PR #5062:
URL: https://github.com/apache/rocketmq/pull/5062#discussion_r972671424
##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java:
##########
@@ -187,6 +190,39 @@ public void check(long transactionTimeout, int transactionCheckMax,
}
}
+ if (BrokerRole.SLAVE.equals(this.transactionalMessageBridge.getBrokerController().getMessageStoreConfig().getBrokerRole())
+ && this.transactionalMessageBridge.getBrokerController().getMinBrokerIdInGroup()
+ == this.transactionalMessageBridge.getBrokerController().getBrokerIdentity().getBrokerId()
+ && this.transactionalMessageBridge.getBrokerController().getBrokerConfig().isEnableSlaveActingMaster()
+ ) {
+ final MessageExtBrokerInner msgInner = this.transactionalMessageBridge.renewHalfMessageInner(msgExt);
+ final boolean isSuccess = this.transactionalMessageBridge.escapeMessage(msgInner);
+
+ if (isSuccess) {
+ escapeFailCnt = 0;
+ newOffset = i + 1;
+ i++;
+ } else {
+ System.out.printf("Escaping transactional message failed %s times! msgId(offsetId)=%s, UNIQ_KEY(transactionId)=%s",
Review Comment:
removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org