Commit 48fe13f
committed
avoid possible nil entry.pb
I0410 15:17:53 72441 volume_layout.go:343] Volume 390 becomes unwritable
I0410 15:17:53 72441 volume_layout.go:343] Volume 391 becomes unwritable
I0410 15:17:53 72441 volume_layout.go:343] Volume 394 becomes unwritable
I0410 15:17:53 72441 volume_layout.go:343] Volume 392 becomes unwritable
I0410 15:17:58 72441 volume_layout.go:343] Volume 393 becomes unwritable
I0410 15:17:58 72441 volume_layout.go:343] Volume 395 becomes unwritable
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1962c8a]
goroutine 68239935 [running]:
github.com/chrislusf/raft.(*LogEntry).Term(...)
/home/travis/gopath/pkg/mod/github.com/chrislusf/raft@v1.0.4/log_entry.go:59
github.com/chrislusf/raft.(*server).TakeSnapshot(0xc00014f320, 0xc028b5a600, 0xc03995bc00)
/home/travis/gopath/pkg/mod/github.com/chrislusf/raft@v1.0.4/server.go:1276 +0x50a
github.com/chrislusf/raft.(*server).maybeTakeSnapshot.func1(0xc00014f320)
/home/travis/gopath/pkg/mod/github.com/chrislusf/raft@v1.0.4/server.go:1221 +0x5b
created by github.com/chrislusf/raft.(*server).maybeTakeSnapshot
/home/travis/gopath/pkg/mod/github.com/chrislusf/raft@v1.0.4/server.go:1219 +0x981 parent a018168 commit 48fe13f
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1273 | 1273 | | |
1274 | 1274 | | |
1275 | 1275 | | |
1276 | | - | |
1277 | | - | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
1278 | 1281 | | |
1279 | 1282 | | |
1280 | 1283 | | |
| |||
0 commit comments