Skip to content

[Bug]: metanode create metapartition raft panic. #2230

@Victor1319

Description

@Victor1319

Describe the bug

dTo]applied(96112591) is out of range [prevApplied(105291801), committed(105292441)])
/root/tmp/cfs/go/src/github.com/cubefs/cubefs/depends/tiglabs/raft/util/runtime.go:38
/root/tmp/cfs/go/src/github.com/cubefs/cubefs/depends/tiglabs/raft/util/runtime.go:28
/usr/local/go/src/runtime/panic.go:965
/root/tmp/cfs/go/src/github.com/cubefs/cubefs/depends/tiglabs/raft/raft_log.go:235
/root/tmp/cfs/go/src/github.com/cubefs/cubefs/depends/tiglabs/raft/raft_fsm.go:123
/root/tmp/cfs/go/src/github.com/cubefs/cubefs/depends/tiglabs/raft/raft.go:135
/root/tmp/cfs/go/src/github.com/cubefs/cubefs/depends/tiglabs/raft/server.go:162
/root/tmp/cfs/go/src/github.com/cubefs/cubefs/raftstore/raftstore.go:192
/root/tmp/cfs/go/src/github.com/cubefs/cubefs/metanode/partition.go:440
/root/tmp/cfs/go/src/github.com/cubefs/cubefs/metanode/partition.go:342
/root/tmp/cfs/go/src/github.com/cubefs/cubefs/metanode/partition.go:297
/root/tmp/cfs/go/src/github.com/cubefs/cubefs/metanode/manager.go:393

when metapartition recover from leader's snapshot, and then the meta node killed before store newest snapshot file to disk, mp create raft will be panic when start metanode again.

To Reproduce

  1. when store snapshot to disk, update code to sleep 1 minutes, to suppose that slow store snapshot to disk case.
  2. update retainlogs count to 20, so snapshot step can be happened easily.
  3. try to create 100 file with a new volume A in the root dir.
  4. stop the A's first mp metapartition replica B
  5. create another 100 files, sleep 5 minutes, create 100 files, sleep 5 miutes again
  6. then start replica B,the replica can't start and will panic.

Expected behavior
metanode service can start normally.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcomponent/metanodeTopic about MetaNode

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions