Commit Graph

31 Commits

Author SHA1 Message Date
mpl b24580d523 blobserver/s3: implement SubFetcher
Change-Id: I42ac364e268463998598990a8bf0df7437f4d05d
2014-10-19 16:11:54 +02:00
mpl 53be9298a5 blobserver/s3: add optional in-memory Fetch cache
Change-Id: I77e27555d28002ba01f1501e8a77eb4adbf701fe
2014-10-18 19:34:25 +02:00
mpl 0967669af0 blobserver/s3: use flags instead of conf file in test
Change-Id: I98c4f9ad6204ec8c534aae3abffaf3410555f86d
2014-10-18 19:03:15 +02:00
Brad Fitzpatrick e0edcdeba3 blobserver/s3: remove stray file
Change-Id: I443e193989139dbb26796488c8cb369d20408508
2014-10-15 12:28:21 +02:00
Brad Fitzpatrick bf8d6bdb4f s3: auto-select correct region, handle buckets with dots in hostname
Fixes camlistore.org/issue/404

Change-Id: Ia6b3f51f1fd5beba585fa8dd8a918d30905fb9bb
2014-05-08 15:31:48 -07:00
Govert Versluis cef0aa0d16 Switch to different S3 endpoint
Switch to a URL in the form of
https://s3.amazonaws.com/mybucket.mydomain.com/myObjectKey
This adds support for buckets with periods in their name and S3 clones

Addresses https://code.google.com/p/camlistore/issues/detail?id=404

Change-Id: Id5c744c88916dbac5a0ab01330929546984ef2d2
2014-04-14 10:48:03 +02:00
Brad Fitzpatrick bfde349851 s3: do some retries in ListBucket, to work around Amazon-vs-Go's HTTP/TLS bug
Change-Id: Idfc8187d07f558f2e7c590dc6c14c66791f46e57
2014-03-17 22:59:02 -07:00
Brad Fitzpatrick bfb0d1e8de s3: more fault injection, and simplify receive, removing spilling to disk
Change-Id: Id7fb01c40dc863bee483887bbf14934161eb03a0
2014-03-16 19:44:52 -07:00
Brad Fitzpatrick bf94a73859 Get rid of SeekFetcher vs StreamingFetcher distinction and complexity.
StreamingFetcher is now just Fetcher, and its FetchStreaming is now
just Fetch.

SeekFetcher is gone. Blobs are max 16 MB anyway, so we can slurp to
memory when needed. The main thing that cared about SeekFetcher
was the GET handler, ServeBlobref, because http.ServeContent needed
one for range requests. That's rewritten in an earlier commit, using
the FakeSeeker from another earlier commit.

Lot of code got simpler as a result.

Change-Id: Ib819413e48a8f9b8d97f596d0fbf771dab211f11
2014-03-14 12:29:13 -07:00
Antti Rasinen f837fcb9d8 Convert all S3 requests to HTTPS
Also includes fixes for two missing data items
for errors.

Change-Id: Ib174b4bf83f3f264f463b4c203c1f42213b18f5e
2014-03-09 21:00:13 +02:00
Brad Fitzpatrick 658472577d s3: be a Stringer, make default host more explicit, add failure injection
Change-Id: I1c24e97ef4b901e3be62fbb7e34c3f53787eedb1
2014-03-05 08:24:30 -08:00
Brad Fitzpatrick ea15158f7c Enumerate changes for future sync changes
Add blobserver.EnumerateAllFrom, make S3 client API match the underlying S3 protocol
with marker instead of after, and then push after->marker conversion logic up
into the s3 enumerate code that's using the S3 client.

Change-Id: I034a7c1c8af441881ebba74bcb523bd690cd16d3
2014-03-04 12:11:59 -08:00
Brad Fitzpatrick d92010ae9c blobserver/s3: add manual test
Change-Id: I5854aecdb3e4d9e03a7cf56dc7901dc859821a46
2014-02-09 08:06:56 -08:00
Tamás Gulácsi 97520583b8 Use 'uint32' instead of 'int64' for blob sizes everywhere.
Not just in blob.SizedRef, but in blobserver.Fetch and
blobserver.FetchStreaming, too.
Blobs have a max size of 10-32 MB anyway, and the index.Corpus is now using
uint32 to save memory.

Change-Id: I1172445c2f9463fdaee55bfe0f1218d44be4aa53
2014-02-08 17:58:12 +01:00
Brad Fitzpatrick b82b8efe4c Start of new context package and *context.Context type.
Will eventually be plumbed through lots of APIs, especially those requiring or benefiting from
cancelation notification and/or those needing access to the HTTP context (e.g. App Engine).

Change-Id: I591496725d620126e09d49eb07cade7707c7fc64
2013-12-02 13:20:51 -08:00
Brad Fitzpatrick 6e92302b1d Fix data races added in 161fc061d3
Change-Id: I7167472de3778fc76cc54dff6c864ed43b2052e9
2013-10-10 19:54:23 -10:00
Tamás Gulácsi 161fc061d3 use syncutil.Group and syncutil.Gate for paralellizing blobserver stats/removes
- where TODO exist.

Change-Id: If7340cf3bfcd5f5211f646404312c2fd15947bd9
2013-10-10 21:52:12 +02:00
Brad Fitzpatrick 59534f0ad6 Move pkg/gate to pkg/syncutil, to house more stuff.
Change-Id: I737458641a9de03da55ed627bfac10f3377a13aa
2013-09-12 16:04:10 +01:00
Brad Fitzpatrick f3f48eb70b Support alternate S3 hostnames
Change-Id: I9a27eb5fb9c4e5ef3b516ce9cf5a4b5bb4e1df61
2013-09-01 09:50:35 -07:00
Brad Fitzpatrick 91cdda8475 Match common Go case
Change-Id: I14606ee5ba422cf43f68dc65af2b40a096c7ca35
2013-09-01 09:13:13 -07:00
Brad Fitzpatrick afac3e1f5b s3: no need to verify hash in ReceiveBlob; handled elsewhere now
Change-Id: I91e85201555f769a8f37a00fe4c0e250a291f298
2013-09-01 09:12:17 -07:00
Brad Fitzpatrick d99840fb03 s3: fix Stat handler to recognize ErrNotExist properly
Change-Id: Ie5afdc2a8f2a9c3bbece49963eccf8f4534228cf
2013-08-31 14:29:15 -07:00
Brad Fitzpatrick d293b8fd34 Use pkg/gate in a couple places. Do s3 parallel state. Update TODO.
Change-Id: I23006baa7b454ceca3f07c8fa7789ad54c524849
2013-08-21 19:05:52 -05:00
Brad Fitzpatrick b24cad68dd Cleanup: remove BlobHub and time.Duration waits from storage interface
Move up a layer to the HTTP.  Also, start to remove ContextWrapper
stuff.  We've done it differently for App Engine instead, and will do
it differently yet moving forward.

Also add blobserver.Receive and use it in most places, moving checksum
verification up a layer.

Bunch of other cleanup and TODO fixing too.

Much simpler and cleaner.

Change-Id: I12e56c5d4e53bfcf82bdd8fb0b6d57c248ff605c
2013-08-21 13:57:28 -07:00
Brad Fitzpatrick 0bdf20884b all: delete pkg/blobref; convert all from *blobref.BlobRef to new blob.Ref
Change-Id: Id2dfb7f19452bedf4f3c9310b36227fd8117b225
2013-08-03 19:54:30 -07:00
Michael Zuffoletti c2669a6dfc issue 23: Fix google storage blobserver as sync dest
Change-Id: I33d88dc5028ebb76d4c17d2a00d8f8346114f876
2013-07-08 11:33:10 -05:00
Brad Fitzpatrick cf0d9aca6e More docs
Change-Id: I5c21f240c85bcf91fb67487cc172bf3faeb49fff
2013-07-07 18:52:14 -07:00
Brad Fitzpatrick ca58d8e2e0 Remove noisy var _ = log.Printf lines.
Change-Id: Ia58b8ef5f271f542ae4fe61c7fb1497322770322
2013-06-14 12:55:55 -07:00
Brad Fitzpatrick 37bf028633 s3: verify configured bucket exists at start-up.
Change-Id: I43d0795641fe9dbc345a1f0916b828ede76cf4a6
2013-01-20 11:33:41 -08:00
Brad Fitzpatrick d0af61a04a Fix bugs in enumerate handler and s3's MaxEnumerateConfig.
Change-Id: Ib9cd52fe7d015a8c70416ec67ff6fd99a7a03d24
2012-12-22 13:50:55 -08:00
Brad Fitzpatrick 0714a463c9 Update from r60 to [almost] Go 1.
A lot is still broken, but most stuff at least compiles now.

The directory tree has been rearranged now too.  Go libraries are now
under "pkg".  Fully qualified, they are e.g. "camlistore.org/pkg/jsonsign".

The go tool cannot yet fetch from arbitrary domains, but discussion is
happening now on which mechanism to use to allow that.

For now, put the camlistore root under $GOPATH/src.  Typically $GOPATH
is $HOME, so Camlistore should be at $HOME/src/camlistore.org.

Then you can:

$ go build ./server/camlistored

... etc

The build.pl script is currently disabled.  It'll be resurrected at
some point, but with a very different role (helping create a fake
GOPATH and running the go build command, if things are installed at
the wrong place, and/or running fileembed generators).

Many things are certainly broken.

Many things are disabled.  (MySQL, all indexing, etc).

Many things need to be moved into
camlistore.org/third_party/{code.google.com,github.com} and updated
from their r60 to Go 1 versions, where applicable.

The GoMySQL stuff should be updated to use database/sql and the ziutek
library implementing database/sql/driver.

Help wanted.

Change-Id: If71217dc5c8f0e70dbe46e9504ca5131c6eeacde
2012-02-18 21:53:06 -08:00