Commit Graph

1448 Commits

Author SHA1 Message Date
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 bfbf660cd1 serverinit: fix flaky test. sort publishRoot prefixes, for predictable output
Change-Id: I230a7d344f9c982539b3ed6d3a88eb1066322ea5
2014-03-14 12:09:17 -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 bfcd26a2ff blob: move Blob type to its own file, add FromFetcher, FromReader
Prep for killing SeekFetcher.

Change-Id: Iade678ccf74d5ebc9613dbb9dbf44b9ed9ff4dea
2014-03-14 11:47:37 -07:00
Brad Fitzpatrick bf96b2af24 types: add NewFakeSeeker
NewFakeSeeker returns a ReadSeeker that can pretend to Seek (based
on the provided total size of the reader's content), but any reads
will fail if the fake seek position doesn't match reality.

Change-Id: I4e63aa78c80fdbcd87b2133018009ed72bedb9f3
2014-03-14 11:09:00 -07:00
Brad Fitzpatrick bf01b14961 index: move seekFetcherMissTracker up a layer
In prep for missing blob dependency rescheduling in indexer.

Change-Id: I1d492e6aa64cfb658daec17e4621d1453c6d3607
2014-03-14 09:14:46 -07:00
Brad Fitzpatrick bf6031a397 search: add operator "childrenof:sha1-xxxxx" to find permanode children of a parent
Change-Id: I9e756147c70f5230aa843ab215dafe5ed6d80087
2014-03-13 19:02:26 -07:00
Brad Fitzpatrick bfa412de5d search: implement some of RelationConstraint (only the "parent" relation)
Allows searching for permanodes based on their parent(s).

Change-Id: I949f159edc43d895e1657bd6ae4c983758ac59f2
2014-03-13 18:49:28 -07:00
Brad Fitzpatrick bfeb745882 corpus: add PermanodeHasAttrValueLocked convenience accessor
Change-Id: Ie73270ce54c3125a76987daa9f50895c5acf42db
2014-03-13 18:48:00 -07:00
Brad Fitzpatrick bf6ae30368 corpus: reverse-index claims with values that look like blobrefs
Allows efficiently finding parents of permanodes, or permanodes of
file contents, etc.

Adds Corpus.ForeachClaimBackLocked.

Change-Id: I6dffb32eab4a959cd3c5922a7f47d11fdcea5f3d
2014-03-13 18:47:25 -07:00
Brad Fitzpatrick 2369d0b009 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-03-11 18:25:41 -07:00
Nick O'Neill f4f4368a40 Added some icons for checkins and venues.
Change-Id: I4bfc5b7a8e099643c159ee6cb2532c71b0e62159
2014-03-11 18:23:13 -07:00
Brad Fitzpatrick dc164e0af3 Merge "Import places and checkins from foursquare." 2014-03-12 00:33:30 +00:00
Nick O'Neill 729d5c5851 Import places and checkins from foursquare.
Change-Id: Ida2e411821f48a88212856398f5fe94caf7acd75
2014-03-11 17:31:17 -07:00
Brad Fitzpatrick bfe7128e94 fs: avoid possible nil pointer crash
http://camlistore.org/issue/401

Change-Id: I7ae091798e2f250898f14ec325a89cbfad4ee6aa
2014-03-11 13:30:58 -07:00
Brian Gitonga Marete 68074bbadd pkg/schema: Fix camput panic on non-utf8 filenames or symlink targets.
Also implement the relevant integration tests for camput and camget.

Depends on CL 2216.

Change-Id: I3f541efd4e583674e9817473292fa3de8a3cdabc
2014-03-10 21:01:51 -07:00
Brad Fitzpatrick d10c9f070b Merge "cmd/camget: Support restoring symbolic links when writing to filesystem." 2014-03-11 03:51:01 +00:00
Brad Fitzpatrick bf48a198c8 search: add test for camliContentImage describing
Test was missing from bf5cc362b5

Change-Id: Ie42bef6f7cff19b69e3bad37f42b8d3a694d9a28
2014-03-10 20:11:32 -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 bf5cc362b5 search: also describe camliContentImage
Change-Id: I64cd4818dead81f5a0dac0e275994df17b7740ef
2014-03-10 19:53:56 -07:00
Brad Fitzpatrick bfe5eafb44 search: remove check on negative search limit.
It's defined and implemented to mean infinite.

Change-Id: Ia50fd2b101d800ba442b4767ddf1c9bf57ea999f
2014-03-10 19:31:33 -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
Brad Fitzpatrick d13bb4aaed Merge "corpus: deleted check when enumerating permanodes" 2014-03-10 17:56:53 +00:00
mpl 0fdca769e0 corpus: deleted check when enumerating permanodes
http://camlistore.org/issue/354

Change-Id: I7d76c654eb3b875ad8017a14a08a5c909bd696a0
2014-03-10 18:43:57 +01: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 bf6d91545c search: remove expr TODO
Change-Id: Iea7826f2924ad229585a1ec3921fceb6130e8207
2014-03-08 21:11:03 -08:00
Brad Fitzpatrick 4d33d6ced3 Merge "attribute search" 2014-03-09 05:11:42 +00:00
Steven L. Speek b326c2db11 attribute search
Change-Id: I9638ca9ef325076122721c601aade05ce99c0c24
2014-03-08 20:58:42 +01:00
Brian Gitonga Marete 0c4b67d3bf cmd/camget: Support restoring symbolic links when writing to filesystem.
This patch adds support for restoring symbolic links when camget is
called with the -o option.

This fixes an issue which caused `camget -o' to write an incomplete
snapshot to the target directory when it encountered a symlink.

Note that no attempt is made to restore the symlink metadata since: a)
A symlink's permissions do not matter and are fixed to 1777 on some
systems b) Go's os.Chtimes() always acts on the symlink target c)
os.Chown() is not currently called for any file in the current code.

Tested on Linux.

Change-Id: I7099592dcd5cc513c2685671be6f6b165f8f8053
2014-03-08 05:14:59 +03:00
Brad Fitzpatrick bfa30b3013 sync: add a button to start a full validation, even when disabled
Change-Id: I229fa70843bb4b9d206788bf150c436c56c82cb7
2014-03-07 17:32:59 -08:00
Brad Fitzpatrick bfa8efc1b9 sync: background validation of src-vs-destination in sync handler
Currently controlled by an environment variable, but will become
a config option + on-demand button in UI in later commits.

Change-Id: I25fa878c9b30cdd713e2859585210eb722092f7b
2014-03-07 10:57:41 -08:00
Brad Fitzpatrick bf22f2db1e Add missing moved file from 76ba33b2
Change-Id: Iadbdc7e576c40da11fbf3261f26bdbae5afe7f1b
2014-03-07 10:06:01 -08:00
Brad Fitzpatrick abca567581 sync: work on full-validation-on-startup. 90% done, disabled.
Change-Id: I5bf062f3b22c2cc41329ff6b23f11198ae543c0f
2014-03-06 16:52:29 -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 58ac8b5469 sync: restore key part accidentally removed prior to earlier submit
Would cause accounting errors before in the face of duplicate uploads.

Change-Id: Ie7c49da1adaf2b9c98ef1015f875a4df8b66729f
2014-03-06 13:23:27 -08:00
Brad Fitzpatrick c1892b5ae5 Rewritten sync handler.
Fix deadlock, much better status page, show per-blob status & errors,
clear errors when they've resolved themselves, fix known data race.

Change-Id: I968de0de4f308ff0a410adceb181a0712800d401
2014-03-05 08:51:22 -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 07178b877a Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-03-04 14:18:27 -08:00
Brad Fitzpatrick 4731e3abec sync: rename lk to more conventional mu
Change-Id: I59f12da9462e4768b59eb135c10f356916191ea7
2014-03-04 13:57:33 -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 2b27dd53c0 Handle Photoshop images better.
We still can't find their width/height or thumbnail the, but at least
we don't wedge the UI now.

Fixes camlistore.org/issue/389

Change-Id: I8af6cefa5d84e7f6e26f3920e4dd6e1d5eb8b192
2014-03-04 10:58:51 -08:00
Brian Gitonga Marete d373f86d9f pkg/client: Fix ignored files matching.
Because of Go's rules regaring closures (function literals) and bound
variables, in the case in which there were multiple patterns in the
ignoredFiles configuration variable, the entire slice (vector) of
registered matching functions was being called with the
last-configured ignoredFiles pattern as the first variable. This meant
that ignoredFiles did not work if it contained more than one pattern
and in certain circumstances, such a configuration would lead to a
crash.

Change-Id: I0b991aa74d079d4ce27fc0ba373e2ee2cf9eb772
2014-03-04 17:30:50 +03:00
mpl 08923e1c00 camtool sync: warn when src and dest have different identities
http://camlistore.org/issue/281

Change-Id: I2e2d595534b14476293a031b88e312de3e0b3f4a
2014-03-01 23:47:49 +01: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 448bbfa0e2 client: better enumerate docs
Change-Id: Id46950fb578f31e17a7600bedf3108eb386826c8
2014-03-01 11:48:20 -08:00
Brad Fitzpatrick bbfcc27d85 sync: use blob.Ref.Less instead of stringify to compare, fix API wart, more tests
Change-Id: Iffd98463becbcf6d62dd666b38fb00572b34725b
2014-03-01 11:34:57 -08:00