mirror of
https://github.com/apache/rocketmq.git
synced 2026-10-30 18:44:38 +08:00
Fix the slave abnormal recover slow issue
This commit is contained in:
@@ -22,6 +22,7 @@ import java.util.List;
|
||||
import org.apache.rocketmq.common.constant.LoggerName;
|
||||
import org.apache.rocketmq.logging.InternalLogger;
|
||||
import org.apache.rocketmq.logging.InternalLoggerFactory;
|
||||
import org.apache.rocketmq.store.config.BrokerRole;
|
||||
import org.apache.rocketmq.store.config.StorePathConfigHelper;
|
||||
|
||||
public class ConsumeQueue {
|
||||
@@ -397,6 +398,9 @@ public class ConsumeQueue {
|
||||
boolean result = this.putMessagePositionInfo(request.getCommitLogOffset(),
|
||||
request.getMsgSize(), tagsCode, request.getConsumeQueueOffset());
|
||||
if (result) {
|
||||
if (this.defaultMessageStore.getMessageStoreConfig().getBrokerRole() == BrokerRole.SLAVE) {
|
||||
this.defaultMessageStore.getStoreCheckpoint().setPhysicMsgTimestamp(request.getStoreTimestamp());
|
||||
}
|
||||
this.defaultMessageStore.getStoreCheckpoint().setLogicsMsgTimestamp(request.getStoreTimestamp());
|
||||
return;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user