writecache: Use object size to check free space #1668

Merged
dstepanov-yadro merged 1 commit from dstepanov-yadro/frostfs-node:fix/writecache_put_space_estimation into master 2025-03-11 08:12:07 +00:00

Before this PR maxObjectSize was used.

Before this PR `maxObjectSize` was used.
dstepanov-yadro added 1 commit 2025-03-10 14:52:41 +00:00
[#9999] writecache: Use object size to check free space
All checks were successful
DCO action / DCO (pull_request) Successful in 40s
Vulncheck / Vulncheck (pull_request) Successful in 1m34s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m46s
Build / Build Components (pull_request) Successful in 2m31s
Tests and linters / Run gofumpt (pull_request) Successful in 2m53s
Tests and linters / Staticcheck (pull_request) Successful in 3m26s
Tests and linters / Lint (pull_request) Successful in 3m31s
Tests and linters / Tests (pull_request) Successful in 3m59s
Tests and linters / Tests with -race (pull_request) Successful in 3m57s
Tests and linters / gopls check (pull_request) Successful in 3m55s
38663a3163
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
requested reviews from storage-core-committers, storage-core-developers 2025-03-10 14:52:42 +00:00
dstepanov-yadro force-pushed fix/writecache_put_space_estimation from 38663a3163 to 8643e0abc5 2025-03-10 14:53:31 +00:00 Compare
acid-ant approved these changes 2025-03-10 15:54:51 +00:00
elebedeva approved these changes 2025-03-10 16:30:18 +00:00
fyrchik approved these changes 2025-03-11 07:41:02 +00:00
@ -60,3 +61,3 @@
// putBig writes object to FSTree and pushes it to the flush workers queue.
func (c *cache) putBig(ctx context.Context, prm common.PutPrm) error {
if !c.hasEnoughSpaceFS() {
if prm.RawData == nil { // foolproof: RawData should be marshalled by shard.
Owner

Even if it is not marshaled, that is not useless.
But could you please double-check that fstree also marshals only if RawData == nil?

Even if it is not marshaled, that is not useless. But could you please double-check that fstree also marshals only if `RawData == nil`?
Author
Member

There is no such check in fstree, but it exists at the blobstor level.

There is no such check in `fstree`, but it exists at the `blobstor` level.
Author
Member

I mean check than RawData != nil and marshal object otherwise.

I mean check than RawData != nil and marshal object otherwise.
dstepanov-yadro merged commit 8643e0abc5 into master 2025-03-11 08:12:07 +00:00
dstepanov-yadro deleted branch fix/writecache_put_space_estimation 2025-03-11 08:12:08 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 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#1668
No description provided.