1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-03 07:36:45 +02:00

volume: file counter should be all files

address https://github.com/seaweedfs/seaweedfs/pull/3388#issuecomment-1220466228
This commit is contained in:
chrislu 2022-08-20 23:35:31 -07:00
parent f7e0a65e75
commit c7892bc7c4

View file

@ -105,9 +105,8 @@ func newNeedleMapMetricFromIndexFile(r *os.File) (mm *mapMetric, err error) {
mm.FileByteCounter += uint64(size) mm.FileByteCounter += uint64(size)
} }
if !bf.TestAndAdd(buf) { mm.FileCounter++
mm.FileCounter++ if bf.TestAndAdd(buf) {
} else {
// deleted file // deleted file
mm.DeletionCounter++ mm.DeletionCounter++
if size.IsValid() { if size.IsValid() {