Add node addresses as debug information #147
No reviewers
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
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#147
Loading…
Reference in a new issue
No description provided.
Delete branch "ironbee/frostfs-sdk-go:extend_debug_info"
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: Artem Tataurov a.tataurov@yadro.com
Closes #51
0cfcbc32ea
to03100bd6f7
@ -692,3 +700,3 @@
}
return oid.ID{}, fmt.Errorf("read payload: %w", c.handleError(ctx, nil, err))
err = c.handleError(ctx, nil, err)
Here must be nil check:
if err = c.handleError(ctx, nil, err); err != nil
There was no check initially and the
c.handleError(ctx, nil, err)
call used "as is". Although, it handles the nil error. I added a nil check to all wrapError methods instead.@ -2485,2 +2495,4 @@
nodes := make([]string, 0, len(inner.clients))
inner.lock.RLock()
for _, cl := range inner.clients {
if cl.isHealthy() {
@fyrchik usually says: 'unrelated to commit'. It must be separate commit, as this change doesn't relate to
Add node addresses as debug information
03100bd6f7
to8ca1cd0b6c
8ca1cd0b6c
todb1d3a4926
@ -404,3 +415,3 @@
cl, err := c.getClient()
if err != nil {
return cid.ID{}, err
return cid.ID{}, c.wrapError(err)
It seems we can log error only on
pool
level.For example:
here we can write
This can reduce number of places where we have to handle errors
db1d3a4926
to4658a1b7e7
4c03286359
toa9264c2d39
@ -2376,3 +2385,2 @@
return res, p.call(ctx, &cc, func() error {
res, err = cc.client.objectSearch(ctx, prm)
return err
if err != nil {
It seems the the
cc.client.objectSearch
call is missed@ -2377,2 +2386,2 @@
res, err = cc.client.objectSearch(ctx, prm)
return err
if err != nil {
return fmt.Errorf("search object via client %s: %w", cc.client.address(), err)
Actually here we can use
cc.endpoint
instead ofcc.client.address()
but it's up to youa9264c2d39
to6bea1095c6
@ -2151,3 +2151,3 @@
// removes session token from cache in case of token error
p.checkSessionTokenErr(err, ctxCall.endpoint)
return id, fmt.Errorf("init writing on API client: %w", err)
return id, fmt.Errorf("init writing on API client %s: %w", ctxCall.client.address(), err)
Why don't use
ctxCall.endpoint
?6bea1095c6
to75cdfc5d9b
@ -9,6 +9,7 @@ import (
type Statistic struct {
overallErrors uint64
nodes []NodeStatistic
currentNodes []string
We need getter for this field
Add node addresses as debug informationto WIP: Add node addresses as debug information75cdfc5d9b
to27020ff242
@ -21,6 +22,11 @@ func (s Statistic) Nodes() []NodeStatistic {
return s.nodes
}
// CurrentNodes returns list of nodes of inner pool that has at least one healthy node.
Let's mention that these nodes have the same priority and this priority is the highest among inner pool with healthy nodes
27020ff242
toa3b5d4d4f5
WIP: Add node addresses as debug informationto Add node addresses as debug information