From 81e7e6ceb3f27caf46b99320918d78c5a1869327 Mon Sep 17 00:00:00 2001 From: Guo Lei Date: Mon, 22 Aug 2022 10:11:18 +0800 Subject: [PATCH] the statistical methord for fileCount should stay same (#3477) the statistical methord for fileCount between should stay same They all equal to the entry count in .idx file. relate to commit(c7892bc) --- weed/storage/needle_map_memory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/storage/needle_map_memory.go b/weed/storage/needle_map_memory.go index dc5b06509..99a9f28e0 100644 --- a/weed/storage/needle_map_memory.go +++ b/weed/storage/needle_map_memory.go @@ -35,8 +35,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() {