Refactorings #223
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#223
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:refactoring/object-3060-remain"
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?
Resolve linters
8bb258de5b
to9e397d9b18
WIP: Refactoringsto Refactorings9e397d9b18
to3c4a4c3a38
@ -213,106 +211,124 @@ func (v *FormatValidator) ValidateContent(o *object.Object) (ContentMeta, error)
case object.TypeRegular:
remove this, since a
default
case was added?fixed
@ -216,2 +214,2 @@
if len(o.Payload()) == 0 {
return ContentMeta{}, fmt.Errorf("(%T) empty payload in tombstone", v)
if err := v.fillAndValidateTombstoneMeta(o, &meta); err != nil {
return ContentMeta{}, err
Maybe expand the error?
fmt.Errorf("validating tombstone: %v", err)
Since the new
fillAndValidateXXX
functions do not always include info about the type. Same in the other cases below.As I understood @fyrchik comment (#223 (comment)), there is no need to add new functionality, since this is refactoring.
@ -245,3 +237,1 @@
if len(o.Payload()) == 0 {
return ContentMeta{}, fmt.Errorf("(%T) empty payload in SG", v)
}
_, ok := o.ContainerID()
do we have some rule to not one-line these? (same below)
this is not introduced by this PR, but seems to happen a lot in the codebase. Not sure what's the benefit of polluting the namespace when there's no need.
fixed
@ -279,2 +280,2 @@
return ContentMeta{}, errors.New("missing container")
}
if err := sg.Unmarshal(o.Payload()); err != nil {
return fmt.Errorf("(%T) could not unmarshal SG content: %w", v, err)
can we avoid the acronym 'SG' here?
This is a refactoring, let's not change any messages.
@ -313,3 +327,3 @@
}
return meta, nil
idList := tombstone.Members()
why the local variable?
fixed
3c4a4c3a38
toe1765dc121
e1765dc121
to2ce721d52d
2ce721d52d
to2c07f831c7