1
0
mirror of https://github.com/taigrr/bitcask synced 2025-01-18 04:03:17 -08:00

Get space that can be reclaimed (#189)

* get reclaimable space added

* import order fix

Co-authored-by: yash <yash.chandra@grabpay.com>
This commit is contained in:
yashschandra
2020-12-01 01:37:00 +05:30
committed by GitHub
parent f4357e6f18
commit 158f6d9888
4 changed files with 94 additions and 11 deletions

View File

@@ -13,6 +13,7 @@ const (
keySize = 4
valueSize = 8
checksumSize = 4
MetaInfoSize = keySize + valueSize + checksumSize
)
// NewEncoder creates a streaming Entry encoder.

View File

@@ -7,7 +7,8 @@ import (
)
type MetaData struct {
IndexUpToDate bool `json:"index_up_to_date"`
IndexUpToDate bool `json:"index_up_to_date"`
ReclaimableSpace int64 `json:"reclaimable_space"`
}
func (m *MetaData) Save(path string, mode os.FileMode) error {