mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-01 15:47:01 +08:00
[ISSUE #4936] Remove useless log output after the master and slave broker are started on the empty disk in controller mode (#4944)
* Fix invalid log output after the master and slave broker are started on the empty disk in controller mode * Remove useless log output after the master and slave broker are started on the empty disk in controller mode
This commit is contained in:
+8
-1
@@ -509,9 +509,16 @@ public class AutoSwitchHAConnection implements HAConnection {
|
||||
|
||||
// Normal transfer method
|
||||
private void buildTransferHeaderBuffer(long nextOffset, int bodySize) {
|
||||
|
||||
EpochEntry entry = AutoSwitchHAConnection.this.epochCache.getEntry(AutoSwitchHAConnection.this.currentTransferEpoch);
|
||||
|
||||
if (entry == null) {
|
||||
LOGGER.error("Failed to find epochEntry with epoch {} when build msg header", AutoSwitchHAConnection.this.currentTransferEpoch);
|
||||
|
||||
// If broker is started on empty disk and no message entered (nextOffset = -1 and currentTransferEpoch = -1), do not output error log when sending heartbeat
|
||||
if (nextOffset != -1 || currentTransferEpoch != -1 || bodySize > 0) {
|
||||
LOGGER.error("Failed to find epochEntry with epoch {} when build msg header", AutoSwitchHAConnection.this.currentTransferEpoch);
|
||||
}
|
||||
|
||||
if (bodySize > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user