Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added more logs and tweaked salud min peer count per bin #4350

Merged
merged 4 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pkg/retrieval/retrieval.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func (s *Service) RetrieveChunk(ctx context.Context, chunkAddr, sourcePeerAddr s
if errors.Is(err, topology.ErrNotFound) {
if skip.PruneExpiresAfter(chunkAddr, overDraftRefresh) == 0 { //no overdraft peers, we have depleted ALL peers
if inflight == 0 {
loggerV1.Debug("no peers left", "chunk_address", chunkAddr, "error", err)
loggerV1.Debug("no peers left", "chunk_address", chunkAddr, "errors_left", errorsLeft, "isOrigin", origin, "error", err)
return nil, err
}
continue // there is still an inflight request, wait for it's result
Expand Down Expand Up @@ -254,7 +254,8 @@ func (s *Service) RetrieveChunk(ctx context.Context, chunkAddr, sourcePeerAddr s
return res.chunk, nil
}

loggerV1.Debug("failed to get chunk", "chunk_address", chunkAddr, "peer_address", res.peer, "error", res.err)
loggerV1.Debug("failed to get chunk", "chunk_address", chunkAddr, "peer_address", res.peer,
"peer_proximity", swarm.Proximity(res.peer.Bytes(), s.addr.Bytes()), "error", res.err)

errorsLeft--
s.errSkip.Add(chunkAddr, res.peer, skiplistDur)
Expand Down
7 changes: 3 additions & 4 deletions pkg/salud/salud.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ import (
const loggerName = "salud"

const (
wakeup = time.Minute
requestTimeout = time.Second * 10
DefaultMinPeersPerBin = 3
maxReserveSizePercentageErr = 0.02 // 2%
wakeup = time.Minute
requestTimeout = time.Second * 10
DefaultMinPeersPerBin = 4
)

type topologyDriver interface {
Expand Down
Loading