Commit Graph

2836 Commits

Author SHA1 Message Date
Brian Tiger Chow
47701aaa2b Merge pull request #566 from jbenet/races
race fixes
2015-01-14 16:35:34 -08: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
Juan Batiz-Benet
4af5d85fac Merge pull request #565 from jbenet/ci-pkgs
testutil ci pkgs check env vars
2015-01-14 16:15:15 -08:00
Brian Tiger Chow
50047dcf27 Update jenkins.go 2015-01-14 16:07:26 -08:00
Juan Batiz-Benet
0311c0518d testing/ci: all env var checks now use new pkgs
Good thing, i checked one wrong, too!
2015-01-14 16:01:03 -08:00
Juan Batiz-Benet
73b3c30452 ci-pkgs: added travis and jenkins ci pkgs 2015-01-14 15:37:10 -08:00
Juan Batiz-Benet
01283b92f7 Merge pull request #556 from jbenet/net-diag-viewer
diag/net: visualizing in d3 and dot
2015-01-14 10:32:56 -08:00
Juan Batiz-Benet
a2cee3f165 diagnostics/d3: added # of conns 2015-01-14 10:29:55 -08:00
Brian Tiger Chow
2dd8eaae3f Merge pull request #559 from jbenet/feat/repo-fsrepo-filelock
refactor(fsrepo.FSRepo): manage the Datastore and daemon.lock
2015-01-14 10:20:47 -08:00
Brian Tiger Chow
bd1d8767eb doc(fsrepo): explain ConfigAt 2015-01-14 10:06:55 -08:00
Brian Tiger Chow
30a5aa9b04 feat(repo): expose the Datastore() in repo.Repo interface 2015-01-14 09:26:13 -08:00
Juan Batiz-Benet
dd409fb151 diagnostics/d3/view: added chord viewer hash 2015-01-14 09:23:48 -08:00
Brian Tiger Chow
12116dd6e4 style(fsrepo): rename to counter.Openers 2015-01-14 09:18:57 -08:00
Juan Batiz-Benet
b9f828e1e3 diagnostics: added chord viewer 2015-01-14 09:18:21 -08:00
Juan Batiz-Benet
2669479056 diagnostics/d3 viewer.html -> force.html 2015-01-14 09:17:48 -08:00
Brian Tiger Chow
b666163e52 test(fsrepo)PERF allow tests to run in parallel 2015-01-14 09:15:06 -08:00
Brian Tiger Chow
6396123b7f feat(fsrepo): expose Datastore in FSRepo interface (+ test) 2015-01-14 09:14:16 -08:00
Brian Tiger Chow
b685f92c95 test(fsrepo): InitIdempotence, NilRemoval, ReopeningDisallowed 2015-01-14 09:05:43 -08:00
Brian Tiger Chow
ece9ed0933 feat(fsrepo): integrate datastore component into FSRepo
"for each desired change, make the change easy (warning: this may be
hard), then make the easy change" - Kent Beck

https://twitter.com/KentBeck/status/250733358307500032

http://martinfowler.com/articles/preparatory-refactoring-example.html

cc @jbenet @whyrusleeping
2015-01-14 08:41:45 -08:00
Brian Tiger Chow
4ba4ee3a0d feat(fsrepo/component.datastore) basic shell 2015-01-14 08:41:45 -08:00
Brian Tiger Chow
7ad559b8c7 refactor(fsrepo, component): expose SetPath to ensure that components handle paths 2015-01-14 08:41:45 -08:00
Brian Tiger Chow
b660305142 extract initCheckDir to dir.Writable 2015-01-14 08:41:45 -08:00
Brian Tiger Chow
887fbe4a8e style(fsrepo) change func to method to be consistent 2015-01-14 08:41:45 -08:00
Brian Tiger Chow
9f67ede6b2 refactor(fsrepo) extract component.Component 2015-01-14 08:41:44 -08:00
Brian Tiger Chow
f37646bf19 refactor(fsrepo) add interface to make it easier to understand how to extend the package 2015-01-14 08:41:44 -08:00
Brian Tiger Chow
c364b4c34c refactor(fsrepo): extract configCompoenent
The struct was getting unmanageable. extracted the config component to
reduce complexity. The datastore will be written as another component.
2015-01-14 08:41:44 -08:00
Brian Tiger Chow
9acc02461e test(fsrepo) harden tests 2015-01-14 08:41:44 -08:00
Brian Tiger Chow
9a054c5800 doc(fsrepo) 2015-01-14 06:08:42 -08:00
Brian Tiger Chow
ac530d0ab6 refactor(fsrepo) move Close under Open 2015-01-14 06:08:36 -08:00
Brian Tiger Chow
70dab069bd doc(fsrepo) 2015-01-14 06:08:30 -08:00
Brian Tiger Chow
6ec60ba861 feat(fsrepo): document lock usage and make the fsrepo thread-safe
fix(fsrepo): extract private, unsynced method to prevent deadlock
2015-01-14 03:57:52 -08:00
Brian Tiger Chow
a3d2362691 use a single coarse package lock 2015-01-14 03:02:24 -08:00
Brian Tiger Chow
53e6a9bd1a fix(fsrepo): remove the Closer after closing it. 2015-01-14 03:02:23 -08:00
Brian Tiger Chow
6ec20b3574 huh 2015-01-14 03:02:23 -08:00
Brian Tiger Chow
76202a9444 fix(repo): clean the path before using it
no issue detected but it's good to be safe
2015-01-14 03:02:23 -08:00
Brian Tiger Chow
40e41d24f7 feat(fsrepo): protect with a repo lockfile
NB: daemon is one spot the repo lock is typically acquired
2015-01-14 03:02:23 -08:00
Brian Tiger Chow
67c161fb72 doc todo 2015-01-14 03:02:23 -08:00
Brian Tiger Chow
9700d2f94b use atomicfile for safer writes
for now, allow daemon and client to both hit config
2015-01-14 03:02:23 -08:00
Brian Tiger Chow
aacf871955 officially move to Go 1.4
@jbenet @whyrusleeping thoughts?
2015-01-14 03:02:22 -08:00
Brian Tiger Chow
acbd9a2204 rm unused function 2015-01-14 03:02:22 -08:00
Brian Tiger Chow
9a7fbe3210 doc(fsrepo): Roadmap 2015-01-14 03:02:22 -08:00
Juan Batiz-Benet
b8757d18ef diag/net: visualizing in d3 and dot
Try it out:

```
ipfs net diag --vis=d3 | diagnostics/d3/d3view
```

Notes: this is not the best way to do it, because it
breaks `--encoding=json`. Not sure what the best way is, and
right now this provides more utility than the other.
2015-01-13 23:49:35 -08:00
Juan Batiz-Benet
6959b4f032 p2p/net/swarm: fix travis env flag val
the travis docs say the env flag TRAVIS=true but, i want
to make absolutely sure. explicitness leaves less room for
error.
2015-01-13 23:34:28 -08:00
Juan Batiz-Benet
920ddc7fc3 Merge pull request #553 from jbenet/serial-file
Serial File Opening
2015-01-13 23:30:08 -08:00
Juan Batiz-Benet
07b35e6a59 Merge pull request #545 from jbenet/stdin-input
Stdin Input
2015-01-13 23:27:04 -08:00
Matt Bell
86bb8ca7a7 core/commands: Enabled stdin for various command arguments 2015-01-13 22:51:11 -08:00
Matt Bell
70adc21d08 core/commands: Enable stdin arguments for 'add' and 'cat', resolves #542 2015-01-13 22:51:10 -08:00
Matt Bell
78d36230d5 commands/cli: When parsing stdin as string argument, split lines into separate tokens 2015-01-13 22:51:10 -08:00
Matt Bell
dbb5118d76 commands/files: Fixed tests 2015-01-13 22:50:54 -08:00
Matt Bell
f8347f925c commands/files: Made ReaderFile take ReadClosers instead of trying to cast reader to Closer 2015-01-13 22:50:54 -08:00