mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 13:57:57 +08:00
count number of volumes and ec shards
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"path"
|
||||
"strconv"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/stats"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
)
|
||||
|
||||
@@ -36,6 +37,8 @@ func NewEcVolumeShard(dirname string, collection string, id needle.VolumeId, sha
|
||||
}
|
||||
v.ecdFileSize = ecdFi.Size()
|
||||
|
||||
stats.VolumeServerEcShardCounter.Inc()
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -78,6 +81,7 @@ func (shard *EcVolumeShard) Close() {
|
||||
|
||||
func (shard *EcVolumeShard) Destroy() {
|
||||
os.Remove(shard.FileName() + ToExt(int(shard.ShardId)))
|
||||
stats.VolumeServerEcShardCounter.Dec()
|
||||
}
|
||||
|
||||
func (shard *EcVolumeShard) ReadAt(buf []byte, offset int64) (int, error) {
|
||||
|
Reference in New Issue
Block a user