HomeThat World

swarm: fix network/stream data races (#19051)

Authored by Janoš Guljaš <janos@users.noreply.github.com> on Feb 13 2019, 12:03 PM.


swarm: fix network/stream data races (#19051)

  • swarm/network/stream: newStreamerTester cleanup only if err is nil
  • swarm/network/stream: raise newStreamerTester waitForPeers timeout
  • swarm/network/stream: fix data races in GetPeerSubscriptions
  • swarm/storage: prevent data race on LDBStore.batchesC


  • swarm/network/stream: fix TestGetSubscriptionsRPC data race


  • swarm/network/stream: correctly use Simulation.Run callback


  • swarm/network: protect addrCountC in Kademlia.AddrCountC function


  • p2p/simulations: fix a deadlock calling getRandomNode with lock


  • swarm/network/stream: terminate disconnect goruotines in tests
  • swarm/network/stream: reduce memory consumption when testing data races
  • swarm/network/stream: add watchDisconnections helper function
  • swarm/network/stream: add concurrent counter for tests
  • swarm/network/stream: rename race/norace test files and use const
  • swarm/network/stream: remove watchSim and its panic
  • swarm/network/stream: pass context in watchDisconnections
  • swarm/network/stream: add concurrent safe bool for watchDisconnections
  • swarm/storage: fix LDBStore.batchesC data race by not closing it

(cherry picked from commit 3fd6db2bf63ce90232de445c7f33943406a5e634)

Event Timeline

Rafael Matias <rafael@skyle.net> committed rGETH8ea3d8ad90f9: swarm: fix network/stream data races (#19051) (authored by Janoš Guljaš <janos@users.noreply.github.com>).Feb 19 2019, 12:11 PM