Add increasing case for the payload size metric #46
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)
|
||||
|
||||
### Fixed
|
||||
- Increase payload size metric on shards' `put` operation (#1794)
|
||||
- Big object removal with non-local parts (#1978)
|
||||
- Disable pilorama when moving to degraded mode (#2197)
|
||||
- Fetching blobovnicza objects that not found in write-cache (#2206)
|
||||
|
|
|
@ -87,7 +87,7 @@ func (s *Shard) delete(prm DeletePrm) (DeleteRes, error) {
|
|||
totalRemovedPayload += removedPayload
|
||||
s.addToContainerSize(prm.addr[i].Container().EncodeToString(), -int64(removedPayload))
|
||||
}
|
||||
s.addToPayloadCounter(-int64(totalRemovedPayload))
|
||||
s.addToPayloadSize(-int64(totalRemovedPayload))
|
||||
|
||||
for i := range prm.addr {
|
||||
var delPrm common.DeletePrm
|
||||
|
|
|
@ -79,6 +79,7 @@ func (s *Shard) Put(prm PutPrm) (PutRes, error) {
|
|||
}
|
||||
|
||||
s.incObjectCounter()
|
||||
s.addToPayloadSize(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 {
|
||||
s.cfg.metricsWriter.AddToPayloadSize(size)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue