Commit Graph

38 Commits

Author SHA1 Message Date
Jeromy
f209763357 blockservice.New doesnt need to return an error
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-14 16:25:51 -07:00
Jeromy
ef294431d4 move util.Key into its own package under blocks 2015-06-01 16:10:08 -07:00
Jeromy
0a6b880bee fix for #1008 and other pinning fixes
This commit adds a new set of sharness tests for pinning, and addresses
bugs that were pointed out by said tests.

test/sharness: added more pinning tests

Pinning is currently broken. See issue #1051. This commit introduces
a few more pinning tests. These are by no means exhaustive, but
definitely surface the present problems going on. I believe these
tests are correct, but not sure. Pushing them as failing so that
pinning is fixed in this PR.

make pinning and merkledag.Get take contexts

improve 'add' commands usage of pinning

FIXUP: fix 'pin lists look good'

ipfs-pin-stat simple script to help check pinning

This is a simple shell script to help check pinning.

We ought to strive towards making adding commands this easy.
The http api is great and powerful, but our setup right now
gets in the way. Perhaps we can clean up that area.

updated t0081-repo-pinning

- fixed a couple bugs with the tests
- made it a bit clearer (still a lot going on)
- the remaining tests are correct and highlight a problem with
  pinning. Namely, that recursive pinning is buggy. At least:
  towards the end of the test, $HASH_DIR4 and $HASH_FILE4 should
  be pinned indirectly, but they're not. And thus get gc-ed out.
  There may be other problems too.

cc @whyrusleeping

fix grep params for context deadline check

fix bugs in pin and pin tests

check for block local before checking recursive pin
2015-04-19 23:40:25 -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
13c489eca1 fix context respect through fuse reading 2015-03-24 12:23:01 -07:00
Jeromy
3bf7d5c27e test for pinning semantics 2015-03-18 22:38:57 -07:00
Jeromy
8d81a8b8d9 fix locking in the pinner 2015-03-17 14:51:26 -07:00
Jeromy
50f0b06bdf Correct pinning for dagmodifier, and a bunch more tests 2015-03-11 19:38:01 -07:00
Juan Batiz-Benet
1d5b903611 added cancel func calls previously ignored 2015-03-07 09:31:46 -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
e49df7bf9f pinner now requires all nodes exist in blockstore 2015-02-18 18:51:51 +00:00
Jeromy
d9783d998a teach pinning how to use GetBlocks 2015-02-18 08:33:26 +00:00
Juan Batiz-Benet
4a5f5e2e2b reprovide: wait a minute before reproviding
Many times, a node will start up only to shut down immediately.
In these cases, reproviding is costly to both the node, and the
rest of the network. Also note: the probability of a node being
up another minute increases with uptime.

TODO: maybe this should be 5 * time.Minute
2015-01-23 05:25:32 -08:00
Jeromy
9adcfe7bc2 address concerns from PR 2015-01-21 04:28:02 +00:00
Jeromy
ccb36277dd fix pinning UX, and add tests to match 2015-01-21 04:28:01 +00:00
Jeromy
b91db68056 update pinning to new semantics, and fix a couple bugs 2015-01-21 04:28:01 +00:00
Juan Batiz-Benet
16690d4af2 race fix: pinner loads with a threadsafe datastore
All the datastores used by pinners and so on should be mutex
wrapped. One issue with changing all of them from
ds.Datastore -> ds.ThreadSafeDatastore is that we wrap the
incoming ds.ThreadSafeDatastore with other datastores, which
do not implement the interface. Re-wrapping again causes
double locking. (which may be ok..., but...) any ideas?
2015-01-14 16:15:38 -08:00
Brian Tiger Chow
670d0244b4 feat(bitswap) make offline exchange query datastore
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 23:31:01 -08:00
Brian Tiger Chow
d0304def6b refactor(blockstore, blockservice) use Blockstore and offline.Exchange
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:24 +00:00
Matt Bell
e6091be0c7 pin: Return copies of pinned keys, of each type (direct/indirect/recursive) 2014-11-19 00:53:23 -08:00
Matt Bell
90e5c7ffa8 pin: Added a Pinner#Set function to retrieve the set of pinned keys 2014-11-18 23:02:22 -08:00
Jeromy
ab805f3382 add in a default file hash and cleaned up init functiona bit 2014-11-15 17:50:05 -08:00
Jeromy
8c20921a95 some more docs 2014-11-08 21:42:36 -08:00
Jeromy
c3d04570c0 a few more comments 2014-11-03 03:53:16 +00:00
Brian Tiger Chow
cea398b8a7 fix(all) log.Debug -> log.Debugf 2014-10-30 06:35:29 -07:00
Juan Batiz-Benet
cb22b62a9b util: remove broken rand 2014-10-30 04:14:05 -07:00
Jeromy
18ada93ec3 rewrite add command to use dagwriter, moved a pinner into the dagwriter for inline pinning 2014-10-30 04:40:48 +00:00
Emery Hemingway
056699cebe convert DAGService to an interface 2014-10-25 22:15:19 -04:00
Juan Batiz-Benet
184c25430b go-vet friendly codebase
- distinguish log.Error and log.Errorf functions
- Initialize structs with field names
- A bit of unreachable code (defers)
2014-10-25 03:46:39 -07:00
Juan Batiz-Benet
4b01ad0b7c fixed pin json marshal 2014-10-22 02:55:22 -07:00
Jeromy
edb5a14f79 update datastore paths 2014-10-22 00:33:14 -07:00
Jeromy
3ee3c44d7c flush! 2014-10-22 00:28:42 -07:00
Jeromy
6f750572cd add lock to pinner and rework cli 2014-10-22 00:28:41 -07:00
Jeromy
31b0ff0307 add testing for pins 2014-10-22 00:28:41 -07:00
Jeromy
6458ddcd32 flesh out pinning object, needs tests and cli wiring still 2014-10-22 00:28:41 -07:00
Jeromy
4d63820bbe move indirect pinning to its own structure 2014-10-22 00:26:11 -07:00
Jeromy
51879e9640 implement unpin and add a datastore backed blockset 2014-10-22 00:26:11 -07:00
Jeromy
7cbfbbc0ad add blockset and bloomfilter and beginnings of pinning service 2014-10-22 00:26:11 -07:00