Skip to content

[ERROR] raft: failed to take snapshot: error="nothing new to snapshot" #637

@ifoxhz

Description

@ifoxhz

I used docker run 3 nodes of raft. I stop all nodes , and restart. The all raft nodes output the error logs:

2025-03-19T17:37:45.335+0800 [ERROR] raft: failed to take snapshot: error="nothing new to snapshot"

Is there normal behavior?

I printf raft object of node:
{raftState:{currentTerm:13 commitIndex:24 lastApplied:24 lastLock:{state:0 sema:0} lastSnapshotIndex:21 lastSnapshotTerm:10 lastLogIndex:24 lastLogTerm:13 routinesGroup:{noCopy:{} state:{:{} :{} v:38654705664} sema:0} state:2} protocolVersion:3 applyCh:0xc000118300 conf:{v:{ProtocolVersion:3 HeartbeatTimeout:1000000000 ElectionTimeout:1000000000 CommitTimeout:50000000 MaxAppendEntries:64 BatchApplyCh:false ShutdownOnRemove:true TrailingLogs:10240 SnapshotInterval:30000000000 SnapshotThreshold:2 LeaderLeaseTimeout:500000000 LocalID:node1 NotifyCh: LogOutput:0xc000122028 LogLevel:DEBUG Logger: NoSnapshotRestoreOnStart:false PreVoteDisabled:false skipStartup:false}} confReloadMu:{state:0 sema:0} fsm:0xc00019a9c0 fsmMutateCh:0xc000114900 fsmSnapshotCh:0xc000118360 lastContact:{wall:0 ext:0 loc:} lastContactLock:{w:{state:0 sema:0} writerSem:0 readerSem:0 readerCount:{:{} v:0} readerWait:{:{} v:0}} leaderAddr:172.28.0.3:10086 leaderID:node1 leaderLock:{w:{state:0 sema:0} writerSem:0 readerSem:0 readerCount:{:{} v:0} readerWait:{:{} v:0}} leaderCh:0xc00010e150 leaderState:{leadershipTransferInProgress:0 commitCh:0xc000294120 commitment:0xc0002906f0 inflight:0xc000290720 replState:map[node0:0xc0002c0410 node3:0xc0002c05b0] notify:map[] stepDown:0xc000294180} candidateFromLeadershipTransfer:{:{} v:0} localID:node1 localAddr:172.28.0.3:10086 logger:0xc00015a6c0 logs:0xc000158520 configurationChangeCh:0xc0001183c0 configurations:{committed:{Servers:[{Suffrage:0 ID:node0 Address:172.28.0.2:10086} {Suffrage:0 ID:node1 Address:172.28.0.3:10086} {Suffrage:0 ID:node3 Address:172.28.0.4:10086}]} committedIndex:4 latest:{Servers:[{Suffrage:0 ID:node0 Address:172.28.0.2:10086} {Suffrage:0 ID:node1 Address:172.28.0.3:10086} {Suffrage:0 ID:node3 Address:172.28.0.4:10086}]} latestIndex:4} latestConfiguration:{v:{Servers:[{Suffrage:0 ID:node0 Address:172.28.0.2:10086} {Suffrage:0 ID:node1 Address:172.28.0.3:10086} {Suffrage:0 ID:node3 Address:172.28.0.4:10086}]}} rpcCh:0xc000118240 shutdown:false shutdownCh:0xc0001184e0 shutdownLock:{state:0 sema:0} snapshots:0xc00019ac00 userSnapshotCh:0xc000118420 userRestoreCh:0xc000118480 stable:0xc000158520 trans:0xc00015c1c0 verifyCh:0xc000114960 configurationsCh:0xc0001149c0 bootstrapCh:0xc000118540 observersLock:{w:{state:0 sema:0} writerSem:0 readerSem:0 readerCount:{:{} v:0} readerWait:{_:{} v:0}} observers:map[1:0xc000455440] leadershipTransferCh:0xc000114a20 leaderNotifyCh:0xc0001185a0 followerNotifyCh:0xc000118600 mainThreadSaturation:0xc00012e540 preVoteDisabled:false}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions