diff --git a/src/Hamok.ts b/src/Hamok.ts index eb16a55..af28001 100644 --- a/src/Hamok.ts +++ b/src/Hamok.ts @@ -1117,11 +1117,16 @@ export class Hamok = Record = Record = Record = Record extends EventEmitter { // message.type === HamokMessageType.INSERT_ENTRIES_REQUEST ? this.codec.valueCodec.decode(message.values[0]) : -1 // ); if (commitIndex <= this._appliedCommitIndex) { - return logger.warn('Received message with commit index %d is older or equal than the last applied commit index %d', commitIndex, this._appliedCommitIndex); + return logger.warn('Connection for id %s Received message with commit index %d is older or equal than the last applied commit index %d', + this.config.storageId, + commitIndex, + this._appliedCommitIndex + ); } // only in test purposes // if (this._appliedCommitIndex + 1 !== commitIndex) { diff --git a/src/raft/MemoryStoredRaftLogs.ts b/src/raft/MemoryStoredRaftLogs.ts index b8b932c..afccb19 100644 --- a/src/raft/MemoryStoredRaftLogs.ts +++ b/src/raft/MemoryStoredRaftLogs.ts @@ -279,7 +279,7 @@ export class MemoryStoredRaftLogs extends EventEmitter implements RaftLogs { this._firstIndex = newCommitIndex; this._memoryEstimateBytesLength = 0; - logger.debug(`Logs are reset. new values: commitIndex: ${this._commitIndex}, nextIndex: ${this._nextIndex}, lastApplied: ${this._firstIndex}`); + logger.warn(`Logs are reset. new values: commitIndex: ${this._commitIndex}, nextIndex: ${this._nextIndex}, lastApplied: ${this._firstIndex}`); } public removeUntil(newFirstIndex: number): void {