-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bitswap Rounds CR suggestions #2 #459
Commits on Dec 17, 2014
-
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 7281f66 - Browse repository at this point
Copy the full SHA 7281f66View commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 260629e - Browse repository at this point
Copy the full SHA 260629eView commit details -
fix: move to callsite so public callers don't experience the internal…
… timeout rule License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 32ae1f9 - Browse repository at this point
Copy the full SHA 32ae1f9View commit details -
good to const until it's required for them to be variable. TODO pass them in as configuration options
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for b188a2c - Browse repository at this point
Copy the full SHA b188a2cView commit details -
refactor: change Tasks to Outbox
notice that moving the blockstore fetch into the manager removes the weird error handling case. License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 0056361 - Browse repository at this point
Copy the full SHA 0056361View commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for bb92988 - Browse repository at this point
Copy the full SHA bb92988View commit details -
fix: move the check into the function.
function should be a no-op when passed an empty slice License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 4e1818d - Browse repository at this point
Copy the full SHA 4e1818dView commit details -
refactor: context first in argument list
(merely by convention) License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 0d77e02 - Browse repository at this point
Copy the full SHA 0d77e02View commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for be87976 - Browse repository at this point
Copy the full SHA be87976View commit details -
refactor: taskKey := p.Key() + block.Key()
for clarity and to avoid errors, define a function License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for fda0617 - Browse repository at this point
Copy the full SHA fda0617View commit details -
the less bitswap has to know about, the easier it'll be for readers. (This now returns Messages.) License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 68ae09f - Browse repository at this point
Copy the full SHA 68ae09fView commit details -
we've been using maps with peers long enough now that this probably is no longer necessary License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 9d2c54c - Browse repository at this point
Copy the full SHA 9d2c54cView commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 9259f66 - Browse repository at this point
Copy the full SHA 9259f66View commit details -
perf: avoid lots of communication by signaling once at end of method
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 3d1d19c - Browse repository at this point
Copy the full SHA 3d1d19cView commit details -
it's not a queue yet but it's okay to name it as such
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for f7310a4 - Browse repository at this point
Copy the full SHA f7310a4View commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 9a6bb16 - Browse repository at this point
Copy the full SHA 9a6bb16View commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 72584ec - Browse repository at this point
Copy the full SHA 72584ecView commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 09ab411 - Browse repository at this point
Copy the full SHA 09ab411View commit details -
refactor: re-use wantlist.Entry type wherever it makes sense
it seems to make sense since, in each place, the Key and Priority represent the same information b/c you know the saying... "It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures." License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 39ee5eb - Browse repository at this point
Copy the full SHA 39ee5ebView commit details -
refactor: separate responsibilties
Before, priority carried two pieces of information. One: priority as defined by remote peer Two: whether task is trashed This assumes the protocol is defined for natural numbers instead of integers. That may not always be the case. Better to leave that assumption outside so this package isn't coupled to the whims of the protocol. The protocol may be changed to allow any integer value to be used. Hopefully by that time, new responsibilties weren't added to the Priority variable. License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 37b1f50 - Browse repository at this point
Copy the full SHA 37b1f50View commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for b23869f - Browse repository at this point
Copy the full SHA b23869fView commit details -
refactor: remove ledgerMap type
it's only used in two places, but i think we've been using maps on IPFS types so much now that the specificity is no longer necessary License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for b0a2ee6 - Browse repository at this point
Copy the full SHA b0a2ee6View commit details -
refactor: put mutex next to the things it protects
If we put the lock next to the fields it protects, it can sometimes make it easier to reason about threadsafety. In this case, it reveals that the task queue (not threadsafe) isn't protected by the mutex, yet shared between the worker and callers. @whyrusleeping License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 87e94f9 - Browse repository at this point
Copy the full SHA 87e94f9View commit details -
refactor: wantlist splits into WL and ThreadSafe WL
bitswap keeps the threadsafe version. observing the ledger shows that it doesn't need it anymore (ledgermanager is protected and safe). License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 81c0979 - Browse repository at this point
Copy the full SHA 81c0979View commit details -
rename to strategy.LedgerManager to decision.Engine
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for aac777d - Browse repository at this point
Copy the full SHA aac777dView commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 1a2e9ee - Browse repository at this point
Copy the full SHA 1a2e9eeView commit details -
this opens up the possibility of having multiple queues. And for all outgoing messages to be managed by the decision engine License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for d5bb556 - Browse repository at this point
Copy the full SHA d5bb556View commit details -
fix: don't sort the output of Entries()
only sort SortedEntries() License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 666ac0b - Browse repository at this point
Copy the full SHA 666ac0bView commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 72965e6 - Browse repository at this point
Copy the full SHA 72965e6View commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 167fbac - Browse repository at this point
Copy the full SHA 167fbacView commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 7b93d74 - Browse repository at this point
Copy the full SHA 7b93d74View commit details -
fix: check blockstore before adding task
addresses #438 (comment) License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for f5133db - Browse repository at this point
Copy the full SHA f5133dbView commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 61ab0df - Browse repository at this point
Copy the full SHA 61ab0dfView commit details -
addresses #438 (comment) License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 6edef72 - Browse repository at this point
Copy the full SHA 6edef72View commit details -
not changing this because i don't want to write a test for it now License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 76889a8 - Browse repository at this point
Copy the full SHA 76889a8View commit details -
in many places, entries are assigned from one slice to another and in different goroutines. In one place, entries were modified (in the queue). To avoid shared mutable state, probably best to handle entries by value. License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 2c834af - Browse repository at this point
Copy the full SHA 2c834afView commit details -
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for fd1da4c - Browse repository at this point
Copy the full SHA fd1da4cView commit details -
refactor(bs/decision.Engine): pass in Entry
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for 07c6a8b - Browse repository at this point
Copy the full SHA 07c6a8bView commit details -
@whyrusleeping may wanna have a look and make sure i didn't screw anything up here BenchmarkInstantaneousAddCat1MB-4 200 10763761 ns/op 97.42 MB/s BenchmarkInstantaneousAddCat2MB-4 panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0xbedd] goroutine 14297 [running]: github.com/jbenet/go-ipfs/exchange/bitswap/decision.(*taskQueue).Remove(0xc2087553a0, 0xc2085ef200, 0x22, 0x56f570, 0xc208367a40) /Users/btc/go/src/github.com/jbenet/go-ipfs/exchange/bitswap/decision/taskqueue.go:66 +0x82 github.com/jbenet/go-ipfs/exchange/bitswap/decision.(*Engine).MessageSent(0xc20871b5c0, 0x56f570, 0xc208367a40, 0x570040, 0xc208753d40, 0x0, 0x0) /Users/btc/go/src/github.com/jbenet/go-ipfs/exchange/bitswap/decision/engine.go:177 +0x29e github.com/jbenet/go-ipfs/exchange/bitswap.(*bitswap).send(0xc20871b7a0, 0x56f4d8, 0xc208379800, 0x56f570, 0xc208367a40, 0x570040, 0xc208753d40, 0x0, 0x0) /Users/btc/go/src/github.com/jbenet/go-ipfs/exchange/bitswap/bitswap.go:352 +0x11c github.com/jbenet/go-ipfs/exchange/bitswap.(*bitswap).taskWorker(0xc20871b7a0, 0x56f4d8, 0xc208379800) /Users/btc/go/src/github.com/jbenet/go-ipfs/exchange/bitswap/bitswap.go:238 +0x165 created by github.com/jbenet/go-ipfs/exchange/bitswap.New /Users/btc/go/src/github.com/jbenet/go-ipfs/exchange/bitswap/bitswap.go:66 +0x49e
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for d36c480 - Browse repository at this point
Copy the full SHA d36c480View commit details -
doc: some comments about the future of the decision engine
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for fa6e63c - Browse repository at this point
Copy the full SHA fa6e63cView commit details -
fix: batches of blocks have equal priority
addresses... https://github.com/jbenet/go-ipfs/pull/438/files#r21878994 License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committedDec 17, 2014 Configuration menu - View commit details
-
Copy full SHA for aaa46cc - Browse repository at this point
Copy the full SHA aaa46ccView commit details