forked from TrueCloudLab/frostfs-node
[#1794] shard: Add increasing case for the payload size metric
Signed-off-by: Artem Tataurov <a.tataurov@yadro.com>
This commit is contained in:
parent
5ffa826897
commit
ab21d90cfb
4 changed files with 4 additions and 2 deletions
|
@ -15,6 +15,7 @@ Changelog for FrostFS Node
|
||||||
- Env prefix in configuration changed to `FROSTFS_*` (#43)
|
- Env prefix in configuration changed to `FROSTFS_*` (#43)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- Increase payload size metric on shards' `put` operation (#1794)
|
||||||
- Big object removal with non-local parts (#1978)
|
- Big object removal with non-local parts (#1978)
|
||||||
- Disable pilorama when moving to degraded mode (#2197)
|
- Disable pilorama when moving to degraded mode (#2197)
|
||||||
- Fetching blobovnicza objects that not found in write-cache (#2206)
|
- Fetching blobovnicza objects that not found in write-cache (#2206)
|
||||||
|
|
|
@ -87,7 +87,7 @@ func (s *Shard) delete(prm DeletePrm) (DeleteRes, error) {
|
||||||
totalRemovedPayload += removedPayload
|
totalRemovedPayload += removedPayload
|
||||||
s.addToContainerSize(prm.addr[i].Container().EncodeToString(), -int64(removedPayload))
|
s.addToContainerSize(prm.addr[i].Container().EncodeToString(), -int64(removedPayload))
|
||||||
}
|
}
|
||||||
s.addToPayloadCounter(-int64(totalRemovedPayload))
|
s.addToPayloadSize(-int64(totalRemovedPayload))
|
||||||
|
|
||||||
for i := range prm.addr {
|
for i := range prm.addr {
|
||||||
var delPrm common.DeletePrm
|
var delPrm common.DeletePrm
|
||||||
|
|
|
@ -79,6 +79,7 @@ func (s *Shard) Put(prm PutPrm) (PutRes, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
s.incObjectCounter()
|
s.incObjectCounter()
|
||||||
|
s.addToPayloadSize(int64(prm.obj.PayloadSize()))
|
||||||
s.addToContainerSize(putPrm.Address.Container().EncodeToString(), int64(prm.obj.PayloadSize()))
|
s.addToContainerSize(putPrm.Address.Container().EncodeToString(), int64(prm.obj.PayloadSize()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -388,7 +388,7 @@ func (s *Shard) addToContainerSize(cnr string, size int64) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Shard) addToPayloadCounter(size int64) {
|
func (s *Shard) addToPayloadSize(size int64) {
|
||||||
if s.cfg.metricsWriter != nil {
|
if s.cfg.metricsWriter != nil {
|
||||||
s.cfg.metricsWriter.AddToPayloadSize(size)
|
s.cfg.metricsWriter.AddToPayloadSize(size)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue