Commit Graph

14 Commits

Author SHA1 Message Date
Steven Allen
a94755dbc5 fix deadlock in bitswap sessions
This deadlock would happen when calling SessionsForBlock (holding
bitswap.sessLk) while the session's main loop was trying to deregister the
session (taking bitswap.sessLk).

I've also defensively added selects on contexts for two other channel writes
just in case.

fixes #4394

...well, it fixes *a* deadlock showing up in that issue, there may be more.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-20 22:28:32 -08:00
Jeromy
332891f7b2 Buffer response channel to prevent deadlock
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-11-12 19:22:42 -08:00
Jeromy Johnson
5c9125e8b5 Merge pull request #4315 from ipfs/feat/sessions-tagging
tag peers associated with a bitswap session
2017-10-18 16:01:03 +01:00
Steven Allen
37296d3958 filter out "" from active peers in bitswap sessions
We use "" to indicate that the block came from the local node. There's no reason
to record "" as an active peer (doesn't really *hurt* but still...).

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-10-17 15:37:46 -07:00
Jeromy
3eafbea262 tag peers associated with a bitswap session
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-10-17 12:03:48 -07:00
Steven Allen
70d6629940 gx: update go-cid, go-multibase, base32
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-09-01 17:46:49 -07:00
Jeromy
cccc6a94a3 update go-multihash and bubble up changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-11 19:27:43 -07:00
Jeromy
8be07cabd0 fix closing and removal of sessions
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-11 09:31:20 -07:00
Jeromy
3be5c913ee fix issue with sessions not receiving locally added blocks
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-07 11:40:41 -07:00
Jeromy
eab2024e43 address CR
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-06 12:06:57 -07:00
Jeromy
579fd46488 track broadcasted wantlist entries
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-05 10:51:51 -07:00
Jeromy
b1247d3323 WIP: wire sessions up through into FetchGraph
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-05 10:48:28 -07:00
Jeromy
e43d1317bb rework how refcounted wantlists work
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-05 10:47:23 -07:00
Jeromy
bda8c3a687 implement bitswap sessions
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-05 10:47:22 -07:00