Fix disksize to work with new WAL

pull/4011/head
Paul Dix 2015-09-08 19:37:33 -07:00
parent dfd6b11dda
commit ecbc79e7e3
1 changed files with 5 additions and 8 deletions

View File

@ -211,15 +211,12 @@ func (l *Log) Open() error {
func (l *Log) DiskSize() (int64, error) {
l.mu.RLock()
defer l.mu.RUnlock()
var size int64
for _, partition := range l.partitions {
stat, err := os.Stat(partition.path)
if err != nil {
return 0, err
}
size += stat.Size()
stat, err := os.Stat(l.path)
if err != nil {
return 0, err
}
return size, nil
return stat.Size(), nil
}
// Cursor will return a cursor object to Seek and iterate with Next for the WAL cache for the given