rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huzongt...@apache.org
Subject [rocketmq] branch develop updated: [ISSUE #1164]Fix Consumer Instance can't consume message from slave when cluster is in the high level tps and master has been killed. (#1181)
Date Mon, 29 Apr 2019 02:38:18 GMT
This is an automated email from the ASF dual-hosted git repository.

huzongtang pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 84d2260  [ISSUE #1164]Fix Consumer Instance can't consume message from slave when
cluster is in the high level tps and master has been killed. (#1181)
84d2260 is described below

commit 84d2260b87bf027fbf6fccb570ca6750fd78c9d3
Author: Hu Zongtang <huzongtang@cmss.chinamobile.com>
AuthorDate: Mon Apr 29 10:38:12 2019 +0800

    [ISSUE #1164]Fix Consumer Instance can't consume message from slave when cluster is in
the high level tps and master has been killed. (#1181)
    
    * [issue#1164]return the codes to original reput method part.
    
    * [issue#1164]fix issue that Consumer Instance can't consume message from slave when cluster
is in the high level tps and master has been killed.
    
    * [issue#1164]if the broker is a master node,then modify reputFromOffset correctly.
    
    * [issue#1164]add some coding comments.
---
 .../main/java/org/apache/rocketmq/store/DefaultMessageStore.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java
index 70efabf..f254dd1 100644
--- a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java
+++ b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java
@@ -1864,10 +1864,12 @@ public class DefaultMessageStore implements MessageStore {
                                     this.reputFromOffset += size;
                                 } else {
                                     doNext = false;
-                                    if (DefaultMessageStore.this.getMessageStoreConfig().isEnableDLegerCommitLog())
{
+                                    // If user open the dledger pattern or the broker is
master node,
+                                    // it will not ignore the exception and fix the reputFromOffset
variable
+                                    if (DefaultMessageStore.this.getMessageStoreConfig().isEnableDLegerCommitLog()
||
+                                        DefaultMessageStore.this.brokerConfig.getBrokerId()
== MixAll.MASTER_ID) {
                                         log.error("[BUG]dispatch message to consume queue
error, COMMITLOG OFFSET: {}",
                                             this.reputFromOffset);
-
                                         this.reputFromOffset += result.getSize() - readSize;
                                     }
                                 }


Mime
View raw message