Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Add additional logging around heyfil / mongo #59

Merged
merged 3 commits into from
Aug 1, 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: 4 additions & 1 deletion eventrecorder/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ func (r *EventRecorder) RecordAggregateEvents(ctx context.Context, events []Aggr
mongoReportCtx, cncl := context.WithTimeout(context.Background(), 30*time.Second)
defer cncl()
var pid peer.ID
pid.UnmarshalText([]byte(reportData.StorageProviderID))
if err := pid.UnmarshalText([]byte(reportData.StorageProviderID)); err != nil {
logger.Warnf("could not parse spid %s: %s", reportData.StorageProviderID, err)
return
}
SPID, ok := <-r.pmap.Get(mongoReportCtx, pid)
if ok {
reportData.SPID = SPID
Expand Down
1 change: 1 addition & 0 deletions spmap/spmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func (s *SPMap) query(ctx context.Context, id peer.ID) []string {
logger.Warnf("failed to decode response from heyfil: %w", err)
return nil
}
logger.Infof("heyfil mapped %d sps for peerID %s", len(sps), id.String())
return sps
}

Expand Down