diff --git a/rpl/file_store.go b/rpl/file_store.go index a8f4940..26a2c5c 100644 --- a/rpl/file_store.go +++ b/rpl/file_store.go @@ -187,7 +187,7 @@ func (s *FileStore) StoreLog(l *Log) error { return s.w.StoreLog(l) } -func (s *FileStore) PuregeExpired(n int64) error { +func (s *FileStore) PurgeExpired(n int64) error { s.rm.Lock() purges := []*tableReader{} @@ -302,6 +302,8 @@ func (s *FileStore) load() error { return err } + s.rs = make(tableReaders, 0, len(fs)) + var r *tableReader var index int64 for _, f := range fs {