未验证 提交 84d2260b 编写于 作者: H Hu Zongtang 提交者: GitHub

[ISSUE #1164]Fix Consumer Instance can't consume message from slave when...

[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.
上级 b3384d28
...@@ -1864,10 +1864,12 @@ public class DefaultMessageStore implements MessageStore { ...@@ -1864,10 +1864,12 @@ public class DefaultMessageStore implements MessageStore {
this.reputFromOffset += size; this.reputFromOffset += size;
} else { } else {
doNext = false; 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: {}", log.error("[BUG]dispatch message to consume queue error, COMMITLOG OFFSET: {}",
this.reputFromOffset); this.reputFromOffset);
this.reputFromOffset += result.getSize() - readSize; this.reputFromOffset += result.getSize() - readSize;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册