diff options
| author | Guo Lei <snipergg@163.com> | 2022-08-22 10:11:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-21 19:11:18 -0700 |
| commit | 81e7e6ceb3f27caf46b99320918d78c5a1869327 (patch) | |
| tree | a04b7e4d680a8a90226d4475ce81e82883420b7f | |
| parent | 63fbf281c764d8f62ee8d75a4c9cf5aee438ff56 (diff) | |
| download | seaweedfs-81e7e6ceb3f27caf46b99320918d78c5a1869327.tar.xz seaweedfs-81e7e6ceb3f27caf46b99320918d78c5a1869327.zip | |
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)
| -rw-r--r-- | weed/storage/needle_map_memory.go | 2 |
1 files changed, 1 insertions, 1 deletions
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() { |
