Commit Graph

12 Commits

Author SHA1 Message Date
Brad Fitzpatrick 194d4f9443 blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps
I had intended for this to be a small change.

I was going to just add context.Context to the BlobReceiver interface,
but then I saw blob.Fetcher could also use one, so I decided to do two
in one CL.

And then it got a bit infectious and ended up touching everything.

I ended up doing SubFetch in the process by necessity.

At a certain point I finally started using context.TODO() in a few
spots, but not too many. But removing context.TODO() will come in the
future. There are more blob storage interfaces lacking context, too,
like RemoveBlobs.

Updates #733

Change-Id: Idf273180b3f8e397ac5929c6d7f520ccc5cdce08
2018-01-18 16:22:16 -08:00
Brad Fitzpatrick d6a0b05df0 Rename import paths from camlistore.org to perkeep.org.
Part of the project renaming, issue #981.

After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.

This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.

Also, this only moves the lru package to internal. More will move to
internal later.

Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.

This updates some docs, but not all.

devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).

Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
2018-01-01 16:03:34 -08:00
Paul Lindner b09cd377d7 Switch to stdlib context from golang.org/x/net/context
This switches most usages of the pre-1.7 context library to use the
standard library.  Remaining usages are in:

  app/publisher/main.go
  pkg/fs/...

Change-Id: Ia74acc39499dcb39892342a2c9a2776537cf49f1
2017-11-26 01:12:26 -08:00
mpl e0d719ba21 pkg/types: remove
Most of it replaced with vendor/go4.org/types and
vendor/go4.org/readerutil

u32 went where needed in pkg/blobserver/*
invertedBool went in pkg/types/serverconfig
atomics64 went in pkg/fs

Change-Id: I230426cda35be4b45ed67e869f14e6fdae89be22
2016-02-05 18:28:47 +01:00
Tamás Gulácsi 9f7e1df32b Remove pkg/context
Use golang.org/x/net/context instead.

Fixes #648.

Change-Id: I676a2f25458be97610a49d6f954f2102cbd373fa
2015-12-12 23:09:02 +01:00
Brad Fitzpatrick 1b2240f51c blobserver/blobpacked: finish StreamBlobs support
Updates #532

Change-Id: Ifcd3d5a2274942355bed5302861dfa27ddf9dcc5
2014-12-25 19:21:24 -08:00
Brad Fitzpatrick f493ad54f4 blobpacked: more streaming tests
Updates #532

Change-Id: I4cf75d81dfc842296cf4efa728e67bd0ad3e3b40
2014-12-23 19:57:29 -08:00
Brad Fitzpatrick 7b984e4ff0 blobpacked: restore loose blob streaming. packed blobs still a TODO.
Updates #532

Change-Id: I8256e102c375a474aa7f488fc814fe2b2b51d886
2014-12-23 19:17:35 -08:00
Brad Fitzpatrick a082382f33 blobserver: simplify interface more, add NewMultiBlobStreamer, storagetest func
This is round two of simplifying the BlobStreamer interface. The
continuation tokens are now sent per-item. This permits the following
item (NewMultiBlobStreamer) but also simplifies the return value (only
returns an error now) and permits the use of buffered channels as the
destination without getting out of sync.

The new NewMultiBlobStreamer is like io.MultiReader, but for
BlobStreamers, letting them be stitched together. This will be used by
the blobpacked storage layer to simplify its code, so it doesn't need
to deal with the handoff between loose and packed blobs itself.  This
MultiBlobStreamer needs a 1 element buffer, which wasn't compatible
with the old BlobStreamer interface, hence the change to include the
continuation tokens with the blob on the channel.

Finally, add a new storagetest function for testing any blobstreamer
and use it for NewMultiBlobStreamer, diskpacked, and later in
blobpacked.

Updates #532

Change-Id: Iccffed289adec93ca5100c7ef8b0a8d57e05833c
2014-12-23 17:49:12 -08:00
Brad Fitzpatrick 37001fa359 blobserver: simplify BlobStreamer interface, remove limitBytes
The caller can count on its own and cancel the context.

Also, I realize again that there's no HTTP interface for this yet, since
I didn't need to update one.

Change-Id: Ie3129bdb0dbc977c1803f18288e4d1e52e2d8478
2014-12-22 06:02:57 +13:00
Brad Fitzpatrick bf91167b98 blobpacked: more StreamBlobs work, start of testing it
Change-Id: Ic3b1ab32ac331602c15bd53964dab582d73c04f4
2014-10-27 15:44:45 -07:00
Brad Fitzpatrick 55f0c91c25 blobpacked: start of untested blob streaming code
Will be used for recovery.

Change-Id: I8a6d219086a306e53b1b621b7bc7cf59b984c765
2014-10-22 15:12:41 -07:00