WIP: Simplify write-cache #314

Closed
carpawell wants to merge 4 commits from carpawell/frostfs-node:refactor/simplify-WC into master
Collaborator

Tests are ok. All the previous scenarios works good. Some Get requests will be slowed down of course.

Tests are ok. All the previous scenarios works good. Some `Get` requests will be slowed down of course.
carpawell self-assigned this 2023-05-04 07:10:46 +00:00
carpawell force-pushed refactor/simplify-WC from bc678bb28f to 12f3458f2a 2023-05-05 17:56:20 +00:00 Compare
carpawell force-pushed refactor/simplify-WC from 12f3458f2a to 9672484abd 2023-05-05 17:57:19 +00:00 Compare
carpawell reviewed 2023-05-05 18:03:12 +00:00
@ -60,0 +65,4 @@
// Write-cache often, and for non-existing objects (persisted
// to the main storage and dropped from the WC's storage) it
// is `os.Stat` vs `os.Remove` calls after all.
res, err := c.fsTree.Get(ctx, common.GetPrm{Address: addr})
Poster
Collaborator

@TrueCloudLab/storage-core-committers, what do you think about it?

some thoughts:

  1. we can add some LRU cache again. it will store object's size;
  2. extend FSTree with some calls like ObjectSize (os.Stat i guess) and IterateObjectSizes (to init metrics on every restart correctly). best idea, i think but it is an FSTree change for write-cache;
  3. store metrics in a separate file. will speed up initializing but becomes more like a metabase with more disk operations per Put/Delete/Get operation;
@TrueCloudLab/storage-core-committers, what do you think about it? some thoughts: 1. we can add some LRU cache again. it will store object's size; 2. extend `FSTree` with some calls like `ObjectSize` (`os.Stat` i guess) and `IterateObjectSizes` (to init metrics on every restart correctly). best idea, i think but it is an `FSTree` change for `write-cache`; 3. store metrics in a separate file. will speed up initializing but becomes more like a `metabase` with more disk operations per `Put`/`Delete`/`Get` operation;
carpawell requested review from storage-core-developers 2023-05-05 18:04:45 +00:00
carpawell requested review from storage-core-committers 2023-05-05 18:04:45 +00:00
carpawell requested review from fyrchik 2023-05-05 18:04:48 +00:00
carpawell changed title from WIP: refactor/simplify-WC to refactor/simplify-WC 2023-05-05 18:05:17 +00:00
carpawell force-pushed refactor/simplify-WC from 9672484abd to 34544502dc 2023-05-05 18:05:40 +00:00 Compare
fyrchik self-assigned this 2023-05-10 12:40:34 +00:00
carpawell was unassigned by fyrchik 2023-05-10 12:40:35 +00:00
dstepanov-yadro reviewed 2023-05-10 12:52:09 +00:00
@ -57,0 +43,4 @@
workersActive = true
}
stopWorkers := m.NoMetabase() && !c.mode.NoMetabase() || c.mode.ReadWrite() && !m.ReadWrite()

wow. looks too complex.

wow. looks too complex.
fyrchik changed title from refactor/simplify-WC to Simplify write-cache 2023-05-10 14:28:19 +00:00
fyrchik changed title from Simplify write-cache to WIP: Simplify write-cache 2023-05-10 14:28:24 +00:00
fyrchik closed this pull request 2023-05-18 15:33:33 +00:00

Closed in favour of #377.

Closed in favour of #377.
All checks were successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
TrueCloudLab/storage-core-committers
No Milestone
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#314
There is no content yet.