metrics: Fix container_size_bytes for EC #1318

Merged
fyrchik merged 1 commit from acid-ant/frostfs-node:bugfix/ec-fix-container-size-b into master 2024-09-04 19:51:11 +00:00
Member

When node put chunk into EC container, policer may remove it as redundant.
This chunk marked as removed. When parent object removed and gc start iterating over chunk,
node count removing chunk twice.

Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com

When node put chunk into EC container, `policer` may remove it as redundant. This chunk marked as removed. When parent object removed and `gc` start iterating over chunk, node count removing chunk twice. Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
acid-ant changed title from metrics: Fix container_size_bytes for EC to WIP: metrics: Fix container_size_bytes for EC 2024-08-19 09:39:48 +00:00
fyrchik reviewed 2024-08-19 11:14:44 +00:00
@ -213,6 +213,7 @@ func (s putStreamMetric) CloseAndRecv(ctx context.Context) (*object.PutResponse,
return res, err
}
Owner

unacceptable

unacceptable
Owner

ah, gofumpt
on a side-note -- we have added it in CI, doesn't it work now?
It seems this was introduced in patch, everything was green there.

ah, gofumpt on a side-note -- we have added it in CI, doesn't it work now? It seems this was introduced in patch, everything was green there.
fyrchik approved these changes 2024-08-19 11:15:54 +00:00
fyrchik reviewed 2024-08-19 11:16:24 +00:00
@ -153,2 +153,3 @@
s.decContainerObjectCounter(res.RemovedByCnrID())
s.addToContainerSize(addr.Container().EncodeToString(), -int64(res.LogicSize()))
if res.LogicCount() > 0 {
s.addToContainerSize(addr.Container().EncodeToString(), -int64(res.LogicSize()))
Owner

So it seems we can have LogicCount() == 0 && LogicSize() != 0? How come?

So it seems we can have `LogicCount() == 0 && LogicSize() != 0`? How come?
Author
Member

First version was introduced too earlier. There was expectation that we can upon on logic counter. PR updated.

First version was introduced too earlier. There was expectation that we can upon on logic counter. PR updated.
acid-ant force-pushed bugfix/ec-fix-container-size-b from a76e567f3a to 6ff0b0996b 2024-08-20 12:34:19 +00:00 Compare
acid-ant requested review from fyrchik 2024-08-20 13:19:30 +00:00
acid-ant requested review from storage-core-committers 2024-08-20 13:19:40 +00:00
acid-ant requested review from storage-core-developers 2024-08-20 13:19:44 +00:00
acid-ant changed title from WIP: metrics: Fix container_size_bytes for EC to metrics: Fix container_size_bytes for EC 2024-08-20 13:19:59 +00:00
acid-ant force-pushed bugfix/ec-fix-container-size-b from 857dcb9d46 to cfda9003a7 2024-08-20 13:21:46 +00:00 Compare
fyrchik approved these changes 2024-08-20 13:25:29 +00:00
dstepanov-yadro approved these changes 2024-08-20 13:25:45 +00:00
fyrchik merged commit cfda9003a7 into master 2024-08-20 13:31:48 +00:00
fyrchik referenced this pull request from a commit 2024-08-20 13:31:49 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1318
No description provided.