Commit Graph

12 Commits

Author SHA1 Message Date
Jeromy
ef294431d4 move util.Key into its own package under blocks 2015-06-01 16:10:08 -07:00
Jeromy
65f815a27b move taskdone inside lock boundaries 2015-05-21 03:08:31 -04:00
Jeromy
6bf33ad62f WIP: super awesome bitswap cleanup fixtime 2015-05-21 03:08:31 -04:00
Jeromy
a159e6825c implement peermanager to control outgoing messages
Also more refactoring of bitswap in general, including some perf
improvements and eventlog removal.

clean up, and buffer channels

move some things around

correctly buffer work messages

more cleanup, and improve test perf

remove unneccessary test

revert changes to bitswap message, they werent necessary
2015-05-21 03:08:30 -04:00
Jeromy
86fb07aed7 try harder to not send duplicate blocks 2015-04-29 01:36:47 -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
Brian Tiger Chow
76bea9be0a move PQ to thirdparty 2015-01-18 15:09:54 -08:00
Brian Tiger Chow
61e4300d59 feat(PQ)
refactor: peerRequestQueue

	it's a mistake to make one queue to fit all. Go's lack of algebraic
	types turns a generalized queue into a monstrosity of type
	checking/casting. Better to have individual queues for individual
	purposes.

	Conflicts:
		exchange/bitswap/decision/bench_test.go
		exchange/bitswap/decision/tasks/task_queue.go

	fix(bitswap.decision.PRQ): if peers match, always return result of pri comparison

	fix(bitswap.decision.Engine): push to the queue before notifying

	TOCTOU bug

	1. client notifies
	2. worker checks (finds nil)
	3. worker sleeps
	3. client pushes (worker missed the update)

	test(PQ): improve documentation and add test

	test(bitswap.decision.Engine): handling received messages

	License: MIT
	Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2015-01-18 15:09:54 -08:00