Split head/get/range into separate functions #1616
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1616
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fyrchik/frostfs-node:refactor-get"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains preliminary work for moving object assembling to a separate package and, eventually, to the SDK.
I have intentionally left out this function, will do in a separate PR (
sourceObjectID
is wrong abstraction, we should split control flow immediately after processing split info).func (a *assembler) initializeFromSourceObjectID(ctx context.Context, id oid.ID) (*oid.ID, []oid.ID, error) {
816f1489fa
to27eea1d086
The word
clamp
is taken from https://docs.rs/num/latest/num/fn.clamp.htmlIn range we try to "clamp" the range of the part to the range user has requested.
@ -0,0 +59,4 @@
// fill the chain end-to-start
for hasPrev {
// check that only for "range" requests,
// for `GET` it stops via the false `withPrev`
What is "false
withPrev
"?Something we do not need any more, removed.
27eea1d086
tof4b3178fc6
New commits pushed, approval review dismissed automatically according to repository settings
599fb412b2
to8d9a578db7
@ -60,3 +61,4 @@
return nil, objectSDK.NewSplitInfoError(a.splitInfo)
}
if len(childrenIDs) > 0 {
How about something like this?
It definitely looks better, to my taste, but I will remove this in another PR anyway.
In this one, I tried to minimize diff (do not touch outer
if
).