application-research / autoretrieve

A server to make GraphSync data accessible on IPFS
22 stars 7 forks source link

fix: don't `return` out of a goroutine loop on error when reporting events #116

Closed rvagg closed 2 years ago

rvagg commented 2 years ago

My local instance is still running after 2 days, with an acceptable number of active retrievals being reported in event logs (i.e. no leak, yay!) but it stopped reporting events after 10 hours.

... 🥁 ... I left returns in for errors when creating and posting event reports when I converted the block into a for{}; so I guess there's been 5 errors during a post because of my garbage internet (or maybe some other failure or timeout in between me and AWS - we have the timeout set to 5 here so it has to be be snappy to post) and each of the goroutines has returned out.

codecov-commenter commented 2 years ago

Codecov Report

Merging #116 (604477a) into master (f259a3c) will increase coverage by 0.30%. The diff coverage is 52.00%.

@@            Coverage Diff             @@
##           master     #116      +/-   ##
==========================================
+ Coverage   13.95%   14.25%   +0.30%     
==========================================
  Files          16       16              
  Lines        2207     2209       +2     
==========================================
+ Hits          308      315       +7     
+ Misses       1884     1880       -4     
+ Partials       15       14       -1     
Impacted Files Coverage Δ
filecoin/eventrecorder/eventrecorder.go 87.25% <52.00%> (+0.25%) :arrow_up:
blocks/manager.go 85.00% <0.00%> (+5.00%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.