Commit Graph

380 Commits

Author SHA1 Message Date
Juan Batiz-Benet
140cd1fd1b remove debugerrors
We now consider debugerrors harmful: we've run into cases where
debugerror.Wrap() hid valuable error information (err == io.EOF?).
I've removed them from the main code, but left them in some tests.
Go errors are lacking, but unfortunately, this isn't the solution.

It is possible that debugerros.New or debugerrors.Errorf should
remain still (i.e. only remove debugerrors.Wrap) but we don't use
these errors often enough to keep.
2015-04-20 00:35:35 -07:00
Jeromy Johnson
43eeab9549 change env var for bitswap
changed IPFS_TASK_WORKERS to IPFS_BITSWAP_TASK_WORKERS
2015-04-19 13:10:43 -07:00
Jeromy
16e04356b9 address comments from CR 2015-04-19 11:19:51 -07:00
Jeromy
3629d7d548 make number of workers tuneable by an env var 2015-04-17 15:57:50 -07:00
Jeromy
3178dfe78b add more bitswap task workers 2015-04-17 12:43:31 -07:00
Jeromy
8450a8d4d8 address comments from CR 2015-04-06 21:49:14 -07:00
Jeromy
76e879c9e0 fix some logic 2015-04-06 21:49:14 -07:00
Jeromy
738db201d9 some code cleanup and commenting 2015-04-06 21:49:14 -07:00
Jeromy
d765c14e8f refactor task queue to have queues per peer 2015-04-06 21:49:14 -07:00
Ho-Sheng Hsiao
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
Jeromy
5eb08c4473 add warning comment about possibly leaked goroutines 2015-03-09 00:22:14 -07:00
Jeromy
8ed0f4b854 respect contexts in a more timely manner 2015-03-08 14:10:02 -07:00
Juan Batiz-Benet
1d5b903611 added cancel func calls previously ignored 2015-03-07 09:31:46 -08:00
Henry
aa55eebe7e fixed two more 2015-03-07 14:47:07 +01:00
Jeromy
34961a5aef toprovide -> toProvide 2015-03-05 16:37:40 -08:00
Jeromy
bfee4894b4 simplify provideCollector 2015-03-05 16:27:47 -08:00
Jeromy
8937f5fbda implement a worker to consolidate HasBlock provide calls into one to alieviate memory pressure 2015-03-05 15:18:57 -08:00
Juan Batiz-Benet
9d167cd5e8 testfix: dont break 8k goroutine limit under race 2015-03-04 07:34:04 -08:00
Henry
d743801638 godep: changed back to inflect upstream 2015-03-01 13:22:27 +01:00
Henry
6cc6a80039 godeps: maybebtc renamed is account 2015-02-27 14:40:45 +01:00
Jeromy
3c8a391fe4 dont put wantlist getter in exchange interface 2015-02-27 00:12:21 -08:00
Jeromy
98a183d53e fix output formatting on stat 2015-02-27 00:12:21 -08:00
Jeromy
b514478f32 rename wantlist to bitswap, add stat command 2015-02-27 00:12:21 -08:00
Jeromy
559a241566 implement a simple wantlist command to allow the user to view their wantlist 2015-02-27 00:12:21 -08:00
Jeromy
8256b18058 make sure not to orphan any extra goroutines 2015-02-26 23:22:12 -08:00
Jeromy
9c66f65410 make wantlist updates to connected peers happen async, dramatically improves performance between connected nodes 2015-02-26 23:22:12 -08:00
Henry
92d08db7a5 rewrote import paths of go.net/context to use golang.org/x/context
- updated go-ctxgroup and goprocess
ctxgroup: AddChildGroup was changed to AddChild. Used in two files:
- p2p/net/mock/mock_net.go
- routing/dht/dht.go

- updated context from hg repo to git
prev. commit in hg was ad01a6fcc8a19d3a4478c836895ffe883bd2ceab. (context: make parentCancelCtx iterative)
represents commit 84f8955a887232b6308d79c68b8db44f64df455c in git repo

- updated context to master (b6fdb7d8a4ccefede406f8fe0f017fb58265054c)

Aaron Jacobs (2):
net/context: Don't accept a context in the DoSomethingSlow example.
context: Be clear that users must cancel the result of WithCancel.

Andrew Gerrand (1):
go.net: use golang.org/x/... import paths

Bryan C. Mills (1):
net/context: Don't leak goroutines in Done example.

Damien Neil (1):
context: fix removal of cancelled timer contexts from parent

David Symonds (2):
context: Fix WithValue example code.
net: add import comments.

Sameer Ajmani (1):
context: fix TestAllocs to account for ints in interfaces
2015-02-25 11:58:19 +01:00
Jeromy
5924f4a3db rename for clarity 2015-02-19 20:07:02 -08:00
Jeromy
d7eb57f48f add worker to bitswap for reproviding new blocks 2015-02-19 20:07:02 -08:00
Jeromy
d8f9f52498 add a test to make sure duplicate subscriptions to the same block dont have weird side effects 2015-02-19 20:07:02 -08:00
Jeromy
a29c0fc751 move blocking calls out of single threaded loops, cancel contexts ASAP 2015-02-19 06:04:39 +00:00
Brian Tiger Chow
0db1a94862 misc: suppress logs to Debug (from Info) 2015-02-14 14:13:53 -08:00
Jeromy
de057f60dd fix a panic caused by context cancelling closing a promise channel 2015-02-12 23:47:11 +00:00
Jeromy
140c70d772 document some packages 2015-02-10 22:59:10 +00:00
Juan Batiz-Benet
58f39687cf logs: removed all log.Errors unhelpful to users
Let's save log.Error for things the user can take action on.
Moved all our diagnostics to log.Debug. We can ideally reduce them
even further.
2015-02-03 01:06:07 -08:00
Juan Batiz-Benet
e908effb4b AddrManager: use addr manager with smarter TTLs
This addr manager should seriously help with the addrsplosion
problem.
2015-02-02 21:04:14 -08:00
Brian Tiger Chow
195c2f3e28 log(bitswap) add message when message received 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
800a3eb940 refactor(bitswap) move workers to bottom of file 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
d9a8cfbd72 feat(bitswap) add deliverBlocks Event 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
4ae02bc022 fix(bitswap) rename PeerToQuery to send wantlist
log(bitswap) remove ambiguous event
2015-02-01 22:08:49 -08:00
Brian Tiger Chow
a1fc5f9cf7 log(bitswap/message) make bsmsg loggable 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
d78b76ddb4 log(bitswap) add bitswap loggable 2015-02-01 22:08:49 -08:00
Juan Batiz-Benet
29178e3c49 fix(bitswap/network/ipfs) ignore self as provider 2015-02-01 22:08:48 -08:00
Brian Tiger Chow
c114b04ae1 feat(bitswap): synchronous close 2015-02-01 21:54:19 -08:00
Juan Batiz-Benet
98f2b0779f p2p/net: notify on listens
Network now signals when it successfully listens on some address
or when an address shuts down. This will be used to establish and
close nat port mappings. It could also be used to notify peers
of address changes.
2015-01-30 20:37:52 -08:00
Brian Tiger Chow
0ec0a6ab87 fix inflection 2015-01-30 06:57:41 -08:00
Brian Tiger Chow
6c2d799cb9 periodically print the number of keys in the wantlist (if any) 2015-01-30 06:57:41 -08:00
Brian Tiger Chow
49f2684c53 expose O(1) len 2015-01-30 06:57:41 -08:00
Brian Tiger Chow
351631a580 pass as param 2015-01-30 06:57:41 -08:00
Brian Tiger Chow
7e90fa95c9 log(bitswap): clean up 2015-01-30 06:57:41 -08:00