writecache: Fix small object flush #726

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:feat/fix_flush_small_objects into master 2024-09-04 19:51:03 +00:00

Now object.Marshal() for small objects is called twice: before put to writecache and before put to blobstore. Lets fix it!

Now `object.Marshal()` for small objects is called twice: before put to writecache and before put to blobstore. Lets fix it!
dstepanov-yadro force-pushed feat/fix_flush_small_objects from 58648a1a0b to 43f7b207ce 2023-10-06 07:47:49 +00:00 Compare
dstepanov-yadro requested review from storage-core-committers 2023-10-06 07:48:08 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-10-06 07:48:11 +00:00
fyrchik reviewed 2023-10-06 08:02:06 +00:00
@ -137,3 +138,3 @@
count++
select {
case c.flushCh <- obj:
case c.flushCh <- m[i]:
Owner

At line 90 we do m = m[:0], can this lead to problems?

At line 90 we do `m = m[:0]`, can this lead to problems?
Owner

IMO this optimization is more important, then slice reuse, so we may drop line 90 if needed.

IMO this optimization is more important, then slice reuse, so we may drop line 90 if needed.
Author
Member

fixed

fixed
fyrchik marked this conversation as resolved
dstepanov-yadro force-pushed feat/fix_flush_small_objects from 43f7b207ce to eb08180367 2023-10-06 08:10:57 +00:00 Compare
fyrchik approved these changes 2023-10-06 08:26:43 +00:00
fyrchik added this to the v0.38.0 milestone 2023-10-06 08:26:53 +00:00
dstepanov-yadro force-pushed feat/fix_flush_small_objects from eb08180367 to d07afd803c 2023-10-06 08:33:02 +00:00 Compare
acid-ant approved these changes 2023-10-06 08:43:31 +00:00
fyrchik approved these changes 2023-10-06 11:33:06 +00:00
fyrchik merged commit d07afd803c into master 2023-10-06 11:33:10 +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#726
No description provided.