Commit Graph

3753 Commits

Author SHA1 Message Date
Juan Batiz-Benet
b036439623 Merge pull request #937 from jbenet/fix/pinning-locks
fix locking in the pinner
2015-03-17 15:39:31 -07:00
Jeromy
8d81a8b8d9 fix locking in the pinner 2015-03-17 14:51:26 -07:00
Juan Batiz-Benet
8fa9252fb1 Merge pull request #913 from vitzli/master
add /dev/crypto-notes.md
2015-03-17 05:22:00 -07:00
Juan Batiz-Benet
d20926f4f6 Merge pull request #932 from andyleap/gateway404
Fixes issue #924
2015-03-17 05:21:07 -07:00
Juan Batiz-Benet
bcc8880a67 Merge pull request #931 from jbenet/fix_continueyn
test/bin: fix continueyn on Linux
2015-03-17 04:16:22 -07:00
Andy Leap
512171aa98 Fixing test failure(issue with looking for exact text) 2015-03-16 16:27:34 -04:00
Andy Leap
89ca37d1d1 Fixes issue #924 2015-03-16 16:08:45 -04:00
Christian Couder
6cc0a6b1de test/bin: fix continueyn on Linux
It looks like there were two problems:

- "read" command probably needs the name of the variable
  it reads into

- [[ didn't work

This might be because on Linux /bin/sh is sometimes not
bash. For example on Ubuntu it is a symlink to dash.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-16 20:02:02 +01:00
Juan Batiz-Benet
36e6286560 Merge pull request #929 from jbenet/t0051_fix_indentation
t0051: fix indentation
2015-03-16 01:30:10 -07:00
Juan Batiz-Benet
bd357d934e Merge pull request #925 from jbenet/fsrepo-cleanup
Fsrepo cleanup
2015-03-15 23:41:16 -07:00
Christian Couder
ef85f67610 t0051: fix indentation
Fix indentation and use > instead of >> to create
an expected file.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-15 17:00:09 +01:00
Tommi Virtanen
03bc2ccb9d Take FSRepo lock way earlier
There is no way this was safe before.

Be careful to unlock on the error paths.
2015-03-13 20:29:02 -07:00
Tommi Virtanen
55228dae11 Simplify FSRepo life cycle, it's either open or closed 2015-03-13 20:29:02 -07:00
Tommi Virtanen
384ca525b4 Clean up fsrepo path handling 2015-03-13 20:29:02 -07:00
Tommi Virtanen
431cf1c902 Remove fsrepo refcounting
No code attempts to open the same repo multiple times.

Error handling is still buggy, but it's starting to get clearer.
2015-03-13 20:28:51 -07:00
Tommi Virtanen
543adf91f1 Move fsrepo lockfile from global map to struct field 2015-03-13 20:26:42 -07:00
Tommi Virtanen
d5ce5da5fe Remove fsrepo Datastore refcounting
repo.Once now does refcounts on a whole Repo level, returning the same
pointer to multiple Openers. This removes the need for the weird model
of separate FSRepo instances pointing to the same underlying storage,
and the races caused by that.
2015-03-13 20:26:42 -07:00
Tommi Virtanen
c8992f2c1b repo.OnlyOne tracks open Repos and reuses them
This will replace the elaborate refcounting in fsrepo, to make it
easier to maintain.
2015-03-13 20:26:22 -07:00
Tommi Virtanen
fdd1cd8dc0 Remove fsrepo.At, make Open a constructor function
Nobody calls At without immediately calling Open.

First step, a mechanical transformation. Cleanups will follow.
2015-03-13 20:19:03 -07:00
Tommi Virtanen
215fed1051 fsrepo.LockedByOtherProcess no longer checks for local opens
This is only called from `ipfs` command line tool well before it opens
the repo. The behavior change here causes a false positive if the
current process has already opened the repo. That's a bit late to ask
this question, anyway, and is not expected to have ever triggered.
2015-03-13 19:43:06 -07:00
Tommi Virtanen
e0bee137e9 fsrepo.Remove no longer checks for concurrently open instances
The only caller is `ipfs init`, which at that time does not hold a
repository open, and refuses to run on existing repos anyway.
2015-03-13 19:43:04 -07:00
Juan Batiz-Benet
bc55fb539f Merge pull request #918 from jbenet/repo-dead-code
Dead code cleanup
2015-03-12 07:23:21 -07:00
Juan Batiz-Benet
3ded27c5e3 Merge pull request #921 from jbenet/moreDeadCode
rm util.NewByteChanReader()
2015-03-12 07:03:11 -07:00
Henry
069b4b5c8e rm util.NewByteChanReader() 2015-03-12 14:50:01 +01:00
vitzli
c5689fe367 move commentary to issue #911; replace with note 2015-03-12 16:53:08 +06:00
Juan Batiz-Benet
2c2bcb8a3a Merge pull request #909 from kkoroviev/fix-daemon-races
Dirty hack to fix race conditions in the daemon
2015-03-12 03:53:01 -07:00
Konstantin Koroviev
01db359c0f Kill the daemon during its startup 2015-03-12 12:05:10 +02:00
Konstantin Koroviev
d23bed5baa Rename ContextIsReadyToBeClosed to InitDone 2015-03-12 11:42:07 +02:00
Juan Batiz-Benet
796db710b6 Merge pull request #889 from jbenet/ipns/refactor-dagmod
Ipns/refactor dagmod
2015-03-12 01:37:41 -07:00
Tommi Virtanen
63c25285b2 Dead code cleanup: remove AllKeys from blockstore
Nothing uses it.
2015-03-11 21:46:57 -07:00
Tommi Virtanen
1a48e6a91f Dead code cleanup: remove Range support from blockstore
Nothing uses it, and offset+limit is a bad query mechanism for
mutating data.
2015-03-11 21:46:57 -07:00
Tommi Virtanen
49732d24fb Dead code cleanup: repo.IsInitialized
The version actually used is in fsrepo, and belongs there as it knows
about fsrepo file layout.
2015-03-11 21:46:30 -07:00
Jeromy
50f0b06bdf Correct pinning for dagmodifier, and a bunch more tests 2015-03-11 19:38:01 -07:00
Jeromy
5ead2a9fab overwrite optimization for dagmodifier 2015-03-11 19:38:01 -07:00
Jeromy
370285fcfa remove temp code in Coal test, and make Size not have to flush 2015-03-11 19:38:01 -07:00
Jeromy
218cc0185c remove pointless TODO 2015-03-11 19:38:01 -07:00
Jeromy
3119088ae7 address comments from @cryptix in PR 2015-03-11 19:38:01 -07:00
Jeromy
58d5c852fd add benchmark 2015-03-11 19:38:01 -07:00
Jeromy
136bece850 Code cleanup 2015-03-11 19:38:01 -07:00
Jeromy
9832545d84 better error message from dagreader with bad protofbuf 2015-03-11 19:38:01 -07:00
Jeromy
63e15abd8f refactor dagmodifier to work with trickledag format 2015-03-11 19:38:01 -07:00
Juan Batiz-Benet
565505c4ba Merge pull request #917 from jbenet/repo-cleanup
Repo cleanup
2015-03-11 19:34:17 -07:00
Tommi Virtanen
24a32af3f1 fsrepo components simplification: directly use datastore 2015-03-11 12:55:13 -07:00
Tommi Virtanen
695b2c491a Rename variable to avoid collision with the path package 2015-03-11 12:37:26 -07:00
Tommi Virtanen
fb39a30c14 fsrepo components simplification: directly use eventlog 2015-03-11 12:14:27 -07:00
Tommi Virtanen
1064d5e01f Rename variable to avoid collision with the path package 2015-03-11 11:10:13 -07:00
Tommi Virtanen
22b6ee328b fsrepo components simplification: directly use config 2015-03-11 11:04:33 -07:00
Tommi Virtanen
0d34b026d5 Ensure FSRepo implements Repo 2015-03-11 10:41:02 -07:00
Juan Batiz-Benet
90d2113f99 Merge pull request #896 from jbenet/t0060_reactivate_daemon_tests
t0060: reactivate daemon tests
2015-03-10 15:55:52 -07:00
Juan Batiz-Benet
c586b6e497 Merge pull request #914 from jbenet/fix/errOnBrokenObjectPut
ipfs object put: return error if object is empty
2015-03-10 15:53:48 -07:00