writecache: Fix metrics and bolt delete #571

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:fix/wc_metrics into master 2023-08-07 12:53:29 +00:00

Closes #563

Estimate cache size after delete objects to update metric.
Fix small object deletion: small objects were never logically deleted from the database.
Do not count bbolt DB file as FSTree object.

Closes #563 Estimate cache size after delete objects to update metric. Fix small object deletion: small objects were never _logically_ deleted from the database. Do not count bbolt DB file as FSTree object.
dstepanov-yadro requested review from storage-core-committers 2023-08-07 09:13:05 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-08-07 09:13:05 +00:00
ale64bit approved these changes 2023-08-07 09:26:00 +00:00
@ -88,3 +79,4 @@
)
c.estimateCacheSize()
}
if err != nil {
Member

} else { ?

`} else {` ?
Author
Member

fixed

fixed
ale64bit marked this conversation as resolved
Owner

The problems was with counters, not with the deletion itself. Can we describe it in the commit message?

The problems was with counters, not with the deletion itself. Can we describe it in the commit message?
fyrchik reviewed 2023-08-07 09:46:55 +00:00
@ -68,6 +68,9 @@ func (c *cache) initCounters() error {
if err != nil {
return fmt.Errorf("could not read write-cache FS counter: %w", err)
}
if inFS > 0 {
Owner

This is worth a separate commit

This is worth a separate commit
Author
Member

This change also applies to metrics, I disagree.

This change also applies to metrics, I disagree.
Owner

These are 2 separate problems with metrics (definitely with different descriptions)
I don't insist, though.

These are 2 separate problems with metrics (definitely with different descriptions) I don't insist, though.
fyrchik marked this conversation as resolved
dstepanov-yadro force-pushed fix/wc_metrics from 6a2e554ea5 to 44e92f06e0 2023-08-07 10:33:12 +00:00 Compare
fyrchik approved these changes 2023-08-07 10:39:54 +00:00
fyrchik merged commit 0e697266c3 into master 2023-08-07 12:53:29 +00:00
Sign in to join this conversation.
No reviewers
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#571
No description provided.