Store tree service sync height in the metabase #82

Merged
fyrchik merged 2 commits from fyrchik/tree-service-store-sync-height into master 2023-03-13 11:25:45 +00:00
fyrchik commented 2023-03-01 11:30:20 +00:00 (Migrated from github.com)

While it changes storage scheme, we can update safely -- after initial sync new height will be saved.

While it changes storage scheme, we can update safely -- after initial sync new height will be saved.
fyrchik requested review from storage-core-committers 2023-03-06 19:13:49 +00:00
fyrchik requested review from storage-core-developers 2023-03-06 19:13:49 +00:00
fyrchik started working 2023-03-06 19:18:36 +00:00
carpawell reviewed 2023-03-09 16:52:13 +00:00
@ -13,6 +13,7 @@ Changelog for FrostFS Node
- Reload config for pprof and metrics on SIGHUP in `neofs-node` (#1868)
- Multiple configs support (#44)
- Parameters `nns-name` and `nns-zone` for command `frostfs-cli container create` (#37)
- Tree service now saves the last synchronization height which persists across restarts (#82)
Collaborator

"82"? we will have conflicts some day then

"82"? we will have conflicts some day then

What do you mean? This PR is #82.

What do you mean? This PR is #82.
Collaborator

what we gonna do when #1868 PR is open in that repo?

what we gonna do when `#1868` PR is open in that repo?

We will discuss, but it is unrelated to this PR.

We will discuss, but it is unrelated to this PR.
Collaborator

it is unrelated to this PR

sure but i would discuss it as early as possible since we are already filling CHANGELOG with conflicting lines (adjacent rows belong to the different lists, what is that file for then?)

> it is unrelated to this PR sure but i would discuss it as early as possible since we are already filling CHANGELOG with conflicting lines (adjacent rows belong to the different lists, what is that file for then?)
@ -216,0 +234,4 @@
var err error
var height uint64
for _, sh := range e.sortShardsByWeight(cid) {
height, err = sh.TreeLastSyncHeight(cid, treeID)
Collaborator

why not getTreeShard?

why not `getTreeShard`?

Mostly because this is a general rule here.
The reason is that getTreeShard performs TreeExists just to find the shard and is really needed only for modifying operations.
TreeLastSyncHeight is cheap, so we can safely use it here without calling TreeExists for each shard in getTreeShard.

Mostly because this is a general rule here. The reason is that `getTreeShard` performs `TreeExists` just to find the shard and is really needed only for modifying operations. `TreeLastSyncHeight` is cheap, so we can safely use it here without calling `TreeExists` for each shard in `getTreeShard`.
carpawell marked this conversation as resolved
acid-ant approved these changes 2023-03-10 10:42:57 +00:00
carpawell approved these changes 2023-03-10 15:09:40 +00:00
fyrchik merged commit 6cd806f998 into master 2023-03-13 11:25:45 +00:00
fyrchik stopped working 2023-03-13 11:25:45 +00:00
6 days 16 hours
fyrchik deleted branch fyrchik/tree-service-store-sync-height 2023-03-13 11:25:46 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No Milestone
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#82
There is no content yet.