[#51] add address to logs #322
No reviewers
TrueCloudLab/storage-core-committers
TrueCloudLab/storage-core-developers
TrueCloudLab/storage-services-committers
Labels
No labels
P0
P1
P2
P3
good first issue
pool
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-sdk-go#322
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "pogpp/frostfs-sdk-go:feature/51_improve_logger"
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?
Signed-off-by: Pavel Pogodaev p.pogodaev@yadro.com
@ -167,3 +168,3 @@
return true, nil
}
return true, err
return true, fmt.Errorf("try put single '%s': %w", it.address, err)
There are plenty of other methods in pool. Why do we change only this one?
f3ede1fc56
toa7fa225b7e
a7fa225b7e
to5b92015d60
@ -2670,6 +2670,10 @@ func (p *Pool) DeleteObject(ctx context.Context, prm PrmObjectDelete) error {
prmCtx.useDefaultSession()
prmCtx.useVerb(session.VerbObjectDelete)
prmCtx.useAddress(prm.addr)
cp, err := p.connection()
Why do we declare this if do not make any requests with it? It's not guaranteed that endpoint would be the same as here
@ -2678,3 +2682,3 @@
relatives, err := relations.ListAllRelations(ctx, p, prm.addr.Container(), prm.addr.Object(), tokens)
if err != nil {
return fmt.Errorf("failed to collect relatives: %w", err)
return fmt.Errorf("failed to collect relatives via client %s: %w", cp.address(), err)
ListAllRelations
(and others) already contains address in error, returned from underlying methodsreturn nil, fmt.Errorf("failed to get raw object header by addr: %s %w", cp.address(), err)
And here:
return oid.ID{}, fmt.Errorf("failed to read split chain member's header by addr: %s %w", cp.address(), err)
Why do we add endpoint to error again?
Maybe we should add endpoint info in places e.g.:
return oid.ID{}, relations.ErrNoLeftSibling
And:
return nil, relations.ErrNoSplitInfo
5b92015d60
to5f110ec850
5f110ec850
to16284cad49
@ -167,3 +168,3 @@
return true, nil
}
return true, err
return true, fmt.Errorf("try put single '%s': %w", it.address, err)
There are other places where error is returned. Why do we update only this?
@ -3241,3 +3249,3 @@
res, err := p.HeadObject(ctx, prm)
if err != nil {
return nil, fmt.Errorf("failed to get linking object's header: %w", err)
return nil, fmt.Errorf("failed to get linking object's header by addr: %s %w", cp.address(), err)
It seems HeadObject returns an err with cc.endpoint already included
@ -3291,3 +3307,3 @@
res, err := p.SearchObjects(ctx, prm)
if err != nil {
return nil, fmt.Errorf("failed to search objects by split ID: %w", err)
return nil, fmt.Errorf("failed to search objects by split ID by addr %s: %w", cp.address(), err)
SearchObjects's err already had an endpoint info
return fmt.Errorf("search object via client %s: %w", cc.endpoint, err)
@ -3323,3 +3343,3 @@
resSearch, err := p.SearchObjects(ctx, prm)
if err != nil {
return nil, fmt.Errorf("failed to find object children: %w", err)
return nil, fmt.Errorf("failed to find object children by addr %s: %w", cp.address(), err)
Same
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.