Browse Source

wal: fix append entry

Xiang Li 11 years ago
parent
commit
43c9ca895b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      wal/wal.go

+ 1 - 1
wal/wal.go

@@ -154,7 +154,7 @@ func (w *WAL) LoadNode() (*Node, error) {
 			if err != nil {
 				return nil, err
 			}
-			ents = append(ents, e)
+			ents = append(ents[:e.Index-1], e)
 		case stateType:
 			s, err := loadState(b.d)
 			if err != nil {