aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/needle_map_memory.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/storage/needle_map_memory.go')
-rw-r--r--weed/storage/needle_map_memory.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/storage/needle_map_memory.go b/weed/storage/needle_map_memory.go
index a2beb6c33..c75514a31 100644
--- a/weed/storage/needle_map_memory.go
+++ b/weed/storage/needle_map_memory.go
@@ -36,8 +36,8 @@ func LoadCompactNeedleMap(file *os.File) (*NeedleMap, error) {
func doLoading(file *os.File, nm *NeedleMap) (*NeedleMap, error) {
e := idx.WalkIndexFile(file, 0, func(key NeedleId, offset Offset, size Size) error {
nm.MaybeSetMaxFileKey(key)
- nm.FileCounter++
if !offset.IsZero() && size.IsValid() {
+ nm.FileCounter++
nm.FileByteCounter = nm.FileByteCounter + uint64(size)
oldOffset, oldSize := nm.m.Set(NeedleId(key), offset, size)
if !oldOffset.IsZero() && oldSize.IsValid() {
@@ -51,7 +51,7 @@ func doLoading(file *os.File, nm *NeedleMap) (*NeedleMap, error) {
}
return nil
})
- glog.V(1).Infof("max file key: %d for file: %s", nm.MaxFileKey(), file.Name())
+ glog.V(1).Infof("max file key: %v count: %d deleted: %d for file: %s", nm.MaxFileKey(), nm.FileCount(), nm.DeletedCount(), file.Name())
return nm, e
}