Commit Graph

47 Commits

Author SHA1 Message Date
Juan Batiz-Benet
f105ce439f get: fix bug + improvements
up until now there has been a very annoying bug with get, we would
get halting behavior. I'm not 100% sure this commit fixes it,
but it should. It certainly fixes others found in the process of
digging into the get / tar extractor code. (wish we could repro
the bug reliably enough to make a test case).

This is a much cleaner tar writer. the ad-hoc, error-prone synch
for the tar reader is gone (with i believe was incorrect). it is
replaced with a simple pipe and bufio. The tar logic is now in
tar.Writer, which writes unixfs dag nodes into a tar archive (no
need for synch here). And get's reader is constructed with DagArchive
which sets up the pipe + bufio.

NOTE: this commit also changes this behavior of `get`:
When retrieving a single file, if the file exists, get would fail.
this emulated the behavior of wget by default, which (without opts)
does not overwrite if the file is there. This change makes get
fail if the file is available locally. This seems more intuitive to
me as expected from a unix tool-- though perhaps it should be
discussed more before adopting.

Everything seems to work fine, and i have not been able to reproduce
the get halt bug.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:50:33 +02:00
Juan Batiz-Benet
f460984594 thirdparty/tar: clearer var names for recursion
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:47:07 +02:00
Juan Batiz-Benet
e3c35d8b76 cmds/get: fix context timeout problem
Get had a random timeout of 60s. This commit fixes that, wiring
up our contexts correctly.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-24 14:43:17 -07:00
Jeromy
10e9ed48bb cleanup unused packages
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-30 12:34:46 -07:00
Jeromy
96e98a8e13 add sharness test for log endpoint
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:02 -07:00
Jeromy
89cb430326 fix mirrorWriter write
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:02 -07:00
Jeromy
67be6bbd57 skip logs when no writers connected
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:01 -07:00
Jeromy
90896f283f clean up unused log options
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:01 -07:00
Jeromy
a676b5a8ac move eventlogs to an http endpoint
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:01 -07:00
rht
18f5fcea28 golint util/, thirdparty/
and exchange/bitswap/testutils.go

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
rht
4b086eff5a Remove Notice{,f} logging interface
And substitute the lines using Notice{,f} with Info{,f}

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
rht
78b6cc5f2d Replace Critical{,f} with Error{,f}
Except when there is an explicit os.Exit(1) after the Critical line,
then replace with Fatal{,f}.
golang's log and logrus already call os.Exit(1) by default with Fatal.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
Henry
46db9de2d9 godeps: drop uuid from code.google.com 2015-05-30 02:56:36 +02:00
rht
ac7edddb94 Run 'gofmt -s -w' on these files 2015-05-19 06:11:15 +07:00
Henry
5c0403c6ef eventlog: buffer writes before pushing them to lumberjack - same effect, no upstream changes. Thx @natefinch! 2015-04-30 13:33:22 +02:00
Henry
eacaa2d739 Revert "use forked lumberjack (buffers writes)"
This reverts commit 7055d76958.
2015-04-30 13:30:03 +02:00
Henry
7055d76958 use forked lumberjack (buffers writes) 2015-04-29 21:03:39 +02: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
Henry
6350cff7c0 pollEndpoint: improve error output 2015-03-22 14:28:17 +01:00
Henry
14090d4a11 moved pollEndpoint to thirdparty/ 2015-03-04 16:25:41 +01:00
Henry
d69bdecbc7 move back to upstream logrus 2015-03-01 00:59:33 +01:00
Henry
6cc6a80039 godeps: maybebtc renamed is account 2015-02-27 14:40:45 +01: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
Brian Tiger Chow
bbcf4e23b1 feat(s3ds) declare the S3 datastore as threadsafe 2015-02-15 04:45:01 -08:00
Brian Tiger Chow
9999106267 feat: initial redis datastore implementation 2015-02-15 04:41:18 -08:00
Brian Tiger Chow
4de93b3387 rename file 2015-02-15 04:41:16 -08:00
Brian Tiger Chow
098edb306f add s3 datastore 2015-02-14 14:13:55 -08:00
Juan Batiz-Benet
91a79bc203 ratelimiter: fixing rate limiter use
Use of the ratelimiter should be conscious of the ratelimiter's
potential closing. any loops that add work to ratelimiter
should (a) only do so if the rate limiter is not closed,
or (b) prevent limiter while work is added
(i.e. use limiter.Go(addWorkHere))
2015-02-06 10:59:03 -08:00
Brian Tiger Chow
bbc9715d4b fix(config, eventlog) use int. it plays nicely with everyone else 2015-02-03 17:19:15 -08:00
Juan Batiz-Benet
2d9550f284 fix(eventlog) add *EventInProgress.Append method 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
68a007945b feat(eventlog) add Pair method 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
809e58f0dd refac(blockservice) extract waitable 2015-02-01 21:54:20 -08:00
Brian Tiger Chow
1dd1e7339b feat(eventlog) add SetError to EventInProgress 2015-02-01 21:54:20 -08:00
Brian Tiger Chow
8f16a4efff feat(eventlog) add support for e := log.Begin... e.Append(Loggable) 2015-02-01 21:54:20 -08:00
Brian Tiger Chow
3c2b6d1205 add iter package 2015-02-01 21:49:39 -08:00
Juan Batiz-Benet
3f5374717d notifs: rate limit notifications 2015-02-01 04:59:48 -08:00
Juan Batiz-Benet
d39feeb5a5 notifier: go todo 2015-01-26 16:45:43 -08:00
Juan Batiz-Benet
0552f46f45 'generic' notifier 2015-01-26 09:09:19 -08:00
Matt Bell
fe48ae2dd6 Extracted TAR archive building/reading code out of 'ipfs get' 2015-01-24 03:06:25 -08:00
Brian Tiger Chow
8c1f93dcf5 fix eventlog format 2015-01-24 01:37:03 -08:00
Brian Tiger Chow
a5ee2efe43 move dir package 2015-01-24 01:32:27 -08:00
Brian Tiger Chow
6fedf259eb remove prefix logger 2015-01-24 00:30:56 -08:00
Brian Tiger Chow
05afd9622b add False method 2015-01-23 19:06:29 -08:00
Brian Tiger Chow
de2cb5d8c7 refactor: extract thirdparty/unit 2015-01-20 17:01:09 -08:00
Brian Tiger Chow
76bea9be0a move PQ to thirdparty 2015-01-18 15:09:54 -08:00
Brian Tiger Chow
c89b5ce824 wip Loggable func 2015-01-18 15:09:38 -08:00
Brian Tiger Chow
884143bf9c move generic packages to thirdparty (see thirdparty/README.md) 2015-01-18 14:04:45 -08:00