filecoin-project / cpp-filecoin

C++17 implementation of Filecoin
https://filecoin.io/
GNU General Public License v3.0
126 stars 36 forks source link

Reconnect socket && worker ping #600

Open Elestrias opened 2 years ago

Elestrias commented 2 years ago

Signed-off-by: elestrias rus8-2002@mail.ru

Description of the Change

Benefits

Possible Drawbacks

Usage Examples or Tests [optional]

Alternate Designs [optional]

codecov[bot] commented 2 years ago

Codecov Report

Merging #600 (48facdb) into master (7777777) will decrease coverage by 0.03%. The diff coverage is 31.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #600      +/-   ##
==========================================
- Coverage   46.02%   45.98%   -0.04%     
==========================================
  Files         715      715              
  Lines       32328    32382      +54     
  Branches    17885    17918      +33     
==========================================
+ Hits        14880    14892      +12     
- Misses      13102    13140      +38     
- Partials     4346     4350       +4     
Impacted Files Coverage Δ
core/api/rpc/wsc.hpp 50.00% <ø> (ø)
core/api/worker_api.hpp 0.00% <ø> (ø)
core/primitives/sector_file/sector_file.hpp 80.00% <ø> (ø)
core/primitives/types.hpp 16.66% <0.00%> (-11.91%) :arrow_down:
core/remote_worker/remote_worker_api.cpp 0.00% <0.00%> (ø)
core/sector_storage/impl/local_worker.cpp 70.79% <0.00%> (-0.36%) :arrow_down:
core/sector_storage/impl/remote_worker.cpp 0.00% <0.00%> (ø)
core/sector_storage/worker.hpp 62.50% <ø> (ø)
core/api/rpc/wsc.cpp 31.91% <25.00%> (-7.03%) :arrow_down:
core/sector_storage/impl/scheduler_impl.cpp 69.36% <66.66%> (-0.35%) :arrow_down:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7777777...48facdb. Read the comment docs.

Elestrias commented 2 years ago

The problem I could see is that with connection retry we can connect to that socket with same host:port but it won't be the same process f e, instead of worker with gpu will be connected worker without gpu, problem is that we don't make changes in miner's worker info