Commit Graph

199 Commits

Author SHA1 Message Date
Brad Fitzpatrick 56ed064b6a Start of 'proxycache' blobserver type.
Change-Id: I8702c1d02203090899eee6c0a555f6fc1dba4e7e
2014-05-15 12:12:21 -07:00
mpl 18421577d5 Merge "camtool sync, localdisk: cancel enumerate to avoid channel lock" 2014-05-08 23:38:45 +00:00
mpl a001c61339 camtool sync, localdisk: cancel enumerate to avoid channel lock
http://camlistore.org/issue/433

Change-Id: Id20d759dc5192dd34e69a866d8dcd44ca106d63b
2014-05-09 01:36:38 +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
Brad Fitzpatrick 559f6530a8 Merge "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" 2014-05-08 22:22:47 +00:00
Mathieu Lonjaret bd52105da6 Merge "camtool: added googinit command" 2014-04-24 13:57:25 +00:00
jakubbrzeski e38dfda67a camtool: added googinit command
It initializes drive or googlestorage.
Deleted gsinit command.

Change-Id: I4d3b82018df9eec4d726cf91fd11be527c9a778a
2014-04-24 13:12:47 +02:00
Brian Gitonga Marete 21753c9350 pkg/blobserver: Modify the definition of the BlobStreamer interface.
Code implementing this interface will use NewBlob(), which has been
modified to return a pointer to blob.Blob. So change the StreamBlobs
function in this interface to also send *.blob.Blob

Change-Id: Ia3b94c3f41f95cb31e96762d4c39b3172cc978f2
2014-04-23 17:43:15 +03: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
Brian Gitonga Marete b6e862af7b pkg/blobserver/encrypt: Log time it takes to read encryption metadata.
We'll use this later on to see the effect of using blob streaming
rather than enumeration. In particular, we will be looking for a
significant speed-up with diskpacked when metadata processing uses
streaming rather than enumeration.

Change-Id: I8295d05d74a84518844237bc48d4f11db8ea14b0
2014-04-13 16:25:19 +03:00
mpl a9db189cd7 docker tests: remove container when done
http://camlistore.org/issue/421

Change-Id: Iefde3a8235db0103e8fcfac51f5dfcce5df73ef6
2014-04-09 23:26:14 +02:00
Brad Fitzpatrick bfc201f7a6 Add blobserver.RefTypes and blob.TypeAlphabet
To be implemented later, but adding now so googledrive's blob storage implementation
can depend on them.

Change-Id: Ief374e8592bd696c79aa2b80ded11e301063750b
2014-04-06 23:07:55 -07:00
Brad Fitzpatrick b63d56ac9d blobserver: more docs on MyPrefix
Change-Id: Icf7fa540c7eb7400719e6baf74f3be746615a4f5
2014-03-30 14:51:54 -07:00
Brad Fitzpatrick 768cb6e0c2 Merge "sorted,dockertest: added MySQL (dockerified) test" 2014-03-27 00:34:30 +00:00
mpl 08f9c821f5 sorted,dockertest: added MySQL (dockerified) test
Two important related changes:

1) sorted/mysql now takes into account the host given in the config
2) the required tables are now automatically created by NewKeyValue

http://camlistore.org/issue/263

Change-Id: I0043f36edb0630d6484148508d3a1e08c8e88a94
2014-03-26 00:39:38 +01:00
Brad Fitzpatrick bf5740afb2 Add BaseURL method to handler Loader.
Change-Id: Ibc61cd19798aa1b0858cbe40b10544953db67b36
2014-03-23 17:13:40 -07:00
Govert Versluis 96637ffcd3 pkg/blobserver/mongo: Add support for blob storage in MongoDB
Related changes:
Split docker-related test-helper functions from pkg/sorted/mongo.
These helper functions are now also used in the pkg/blobserver/mongo
tests too.
Also fixed a typo in a comment in pkg/blob/fetcher.go and a missing variable in
debug output in pkg/blobserver/storagetest/storagetest.go

Addresses http://camlistore.org/issue/127

Change-Id: I8b6f57f9ced066d6f83788fdcc87be6619c65c3c

Conflicts:
	pkg/blob/fetcher.go
2014-03-22 12:36:59 -07:00
Tamás Gulácsi bc39d9888c Diskpacked: support deletion
Delete from index and zero out blob's data.
Use FALLOC_FL_PUNCH_HOLE if available (linux >= 2.6.38).

Change-Id: I0c194fd6734a35b520212398d93dfdc5cabadeb5
2014-03-20 21:20:36 +01:00
Brad Fitzpatrick bfe51f3ad5 gofmt
Change-Id: Ie6be315d02a439cbfdd870a0b0b7f16cba12a168
2014-03-20 12:29:45 -07:00
Brad Fitzpatrick bfe61b1297 storagetest: add a test of EnumerateBlobs w/ prefix of a blobref
Change-Id: Id865da5ba6c65e0110b0eb6c6d0bd45980d33105
2014-03-18 13:47:02 -07:00
Brad Fitzpatrick bf2d86738e blobserver: give ListMissingDestinationBlobs the ability to exit earlier
If there's an enumeration error for src or dst, sending a zero value
will shut down ListMissingDestinationBlobs.

Change-Id: I95598e9dc2607610436faa06f40485d1abd2342f
2014-03-17 23:20:37 -07: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 bf28dd4488 More status handler HTML+JSON, more sync status.
Change-Id: I0381853191d5b871af649d102b976e592def791f
2014-03-16 20:14:57 -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
Brad Fitzpatrick bf4e8f7238 gethandler: rewrite to not use SeekerFromStreamingFetcher; add tests
Change-Id: I785dd56f7bc7c1f113575700c74f910b4f4ea4a0
2014-03-14 11:52:11 -07:00
Brad Fitzpatrick bffe14c682 diskpacked: fix dev server
Was broken in bf6bde214a

Change-Id: Ia184a7c8373e2b303cfd6e8ae6091150de1a8d15
2014-03-10 20:10:00 -07:00
Brad Fitzpatrick bf6bde214a diskpacked: optional support for alternate index sorted.KeyValue store
By default it will use cznic/kv. But if you want to use something else
(like MySQL, or leveldb, or Postgres, or Mongo), you can.

Change-Id: I8ce3571a701717ffde3b80856c72a9e3223ab439
2014-03-10 19:01:21 -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 bf22f2db1e Add missing moved file from 76ba33b2
Change-Id: Iadbdc7e576c40da11fbf3261f26bdbae5afe7f1b
2014-03-07 10:06:01 -08:00
Brad Fitzpatrick 76ba33b27a Move ListMissingDestinationBlobs from pkg/client to blobserver
Change-Id: I7489531fe2a1a5127b2212d5a5f80d4c4c614353
2014-03-06 15:04:15 -08:00
Brad Fitzpatrick 023fba5629 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-03-05 08:39:15 -08: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 260a33aa2a Make various popular storage targets be Stringers. Optional, for upcoming sync handler rewrite.
Change-Id: I8cc961ace8b6093b1dbd82bc39ba3fc334f1d5c7
2014-03-05 08:23:07 -08:00
Brad Fitzpatrick 97338594c7 blobserver: simplify NoImplStorage code
Change-Id: Icc133667b5038783609082ec412f7fca7ecce927
2014-03-04 22:45:35 -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 11cd3127c8 Backwards-compatible protocol + handler change on boundary of enumerating blobs.
The handler was adding 1 to things to see if it was at the end, but that was causing
HTTP requests to Amazon like: limit 1000, limit 1, limit 1000, limit 1, etc.

This makes it twice as fast.

Change-Id: Ibb7e3f6ae7229a21c87817c7438324d36e7b491a
2014-03-01 13:12:05 -08:00
Brad Fitzpatrick 440d0c461e blobserver/handler: rename conn to rw, per more recent conventions
Change-Id: Ibd28bc66f9d1f6c9dac776ce78a9da9baddba7c4
2014-03-01 12:24:56 -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 1b1087a830 Add pkg/blobserver/archiver for making Glacier archives.
From the package docs:

  Package archiver zips lots of little blobs into bigger zip files
  and stores them somewhere. While generic, it was designed to
  incrementally create Amazon Glacier archives from many little
  blobs, rather than creating millions of Glacier archives.

Change-Id: If304b2d4bf144bfab073c61c148bb34fa0be2f2d
2014-02-07 14:32:36 -08:00
Brad Fitzpatrick 4afc5d32f0 diskpacked: don't append duplicate blobs.
Change-Id: I3adce39641458a67a3cdee09bb66411dd1111acd
2014-02-07 10:46:35 -08:00
Brad Fitzpatrick 9a9da7196b localdisk: add IsDir
Change-Id: I98748d6cb8ff650e0369ef0518eeeefce73f0354
2014-02-07 10:45:43 -08:00
Brad Fitzpatrick 254239c379 diskpacked: add IsDir and New
Change-Id: Iba7bfa4772c494240104f4f67e4a1a946f64b6c8
2014-02-07 10:45:22 -08:00
Brad Fitzpatrick 1fcb446d38 dir: add new blobserver/dir package to do localdisk or diskpacked
Change-Id: I27a2d6b7a00e34490b9da264280c5b10f81c30ec
2014-02-07 09:50:59 -08:00
Brad Fitzpatrick 1046470614 Rename ResponseWriter 'conn' to 'rw'
Change-Id: Id0faeac080f678794c1db1601cb9c1a9ba92e926
2014-02-03 20:23:39 -05:00
Brad Fitzpatrick d5ec2925dd namespace: finish tests
Change-Id: Ib34364473e407e78fd691256ad1afe8c810911a9
2014-01-20 13:08:37 -08:00
Brad Fitzpatrick 2b06004813 Merge "diskpacked: keep fd open to every pack file." 2014-01-20 19:59:58 +00:00
Bill Thiede 5c884e52ca diskpacked: keep fd open to every pack file.
Bytes read/writen per pack file, as well as per configured diskpacked
configuration are now available as expvars.

Also add reader stat helpers to pkg/types and updated the original
user in server/image.go

Change-Id: Ifc9d76c57aab329d4b947e9a4ef9eac008bc608d
2014-01-20 10:50:42 -08:00
Brad Fitzpatrick aebc8f00c6 cond: add test using storagetest
Change-Id: Iffd987de42d82e1c19ff2c984ff3d2f01824e34c
2014-01-20 10:37:23 -08:00