forked from mirror/ledisdb
rpl fix panic bug
This commit is contained in:
parent
5196e211cc
commit
c737ec82ff
|
@ -187,7 +187,7 @@ func (s *FileStore) StoreLog(l *Log) error {
|
||||||
return s.w.StoreLog(l)
|
return s.w.StoreLog(l)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FileStore) PuregeExpired(n int64) error {
|
func (s *FileStore) PurgeExpired(n int64) error {
|
||||||
s.rm.Lock()
|
s.rm.Lock()
|
||||||
|
|
||||||
purges := []*tableReader{}
|
purges := []*tableReader{}
|
||||||
|
@ -302,6 +302,8 @@ func (s *FileStore) load() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s.rs = make(tableReaders, 0, len(fs))
|
||||||
|
|
||||||
var r *tableReader
|
var r *tableReader
|
||||||
var index int64
|
var index int64
|
||||||
for _, f := range fs {
|
for _, f := range fs {
|
||||||
|
|
Loading…
Reference in New Issue