Commit Graph

381 Commits

Author SHA1 Message Date
mpl 6d19d64b88 devcam server: properly wipe mongo
Change-Id: Ib75a460a4be84e21affc662d45b3cf1e321b15bd
2013-12-13 17:37:19 +01:00
mpl ab5e385113 index: move kvfile implementation to sorted
Change-Id: Ie6e676570af088246ef028a2f003b537d85dd6ae
2013-12-13 16:59:45 +01:00
mpl fcbbf2a4df index: move mongo implementation to sorted
Also devcam server -wipe wasn't wiping for mongo anymore, now fixed.

Change-Id: Iecc9d8025ddfba8d8ae9417ee170baf02be1d52f
2013-12-13 00:25:40 +01:00
Brad Fitzpatrick 9ac73660a1 Sort recent permanodes first by time, then by blobref.
Just in case two permanodes were modified in the same nanosecond (or
more likely: the client's clock resolution sucks when they created the
mutation).

Fixes http://camlistore.org/issue/261

Change-Id: I293fc0f771bccc0473fefdcc2178284066b7a05c
2013-12-12 13:03:00 +04:00
Brad Fitzpatrick a0576f2c0d Fix corpus/search locking bugs.
The WebSockets live queries exposed a latent locking bug: the search
code was acquiring the Corpus read lock multiple times.  If a write
came in during the middle of a search, between two read locks, the
second RLock would hang (since a writer lock was pending) and then the
search and write would deadlock.

Instead, just acquire the read lock once at the beginning of the query and
never re-acquire it.  For now: new "Locked" versions of all the Corpus APIs.
In the future: will probably just add the locked-or-not into the context, and make
sure all Corpus methods require a *context.Context.

Also fix two potential data races: one with LogicalCondition (which
might've raced on the scratch ss buffer, depending on the query), and
a test-only race that didn't matter in production, but was annoying in
tsan output regardless, so fixed.

More tests to follow later. Unblocking Aaron for now.

Change-Id: Ie1edcbd061235f1ef04f9b4c68b86814c84361af
2013-12-12 11:34:07 +04:00
Brad Fitzpatrick 328706b8c6 index: bunch of TODOs and planning for edge tracking
Also, change to storing a pointer to claims so those pointers can be re-used elsewhere.

Change-Id: Ib0979d622ba48f1e2389575d07d7a0930264ebea
2013-12-09 17:15:34 +04:00
Brad Fitzpatrick 2f9b87ad59 index: ignore recpn log spam, export SetVerboseCorpusLogging for pkg/search tests
Change-Id: Ie18c8db5ab33e94a6c37e3fa19170ac046d864b2
2013-12-09 11:26:33 +04:00
Bill Thiede 2e1dcca4e4 index/corpus: Add copyright header
Also update copyrightifity.

Change-Id: Icce92d96c4bd2eaba5002d85641756ed3fd672fa
2013-12-08 22:44:08 -08:00
Brad Fitzpatrick f806008d06 Corpus: after meta rows, scan rest all in parallel.
This works well enough for MySQL at least. We'll see if it hurts the other sorted.KeyValue
implementations. If so, we might have to fix those.

Change-Id: I71e9f56f2dee9e7334c7a35a4960f55399ca306f
2013-12-07 19:11:31 -08:00
Brad Fitzpatrick 9d56f61921 Make all corpus row merge funcs take []byte to reduce garbage on startup slurp.
Change-Id: I28cccdbe59792af16264d65e27b2a914e9285db2
2013-12-07 11:08:19 -08:00
Brad Fitzpatrick 76171ddb3d Change sorted.KeyValue.Find to take an optional end bound; add tests.
The new package sorted/kvtest provides a generic KeyValue test for all
implementations. Memory, SQLite, and kvfile now use it.

This speeds up the index slurping start-up of my personal Camlistore
server from 30 seconds (when it was doing 17,000+ queries in small
windows) to now just 5 seconds. That 5 seconds can be improved yet
further.

Change-Id: Idd55ba9ccd3ed12a26868a41db1af676aff7b67b
2013-12-07 08:43:18 -08:00
Brad Fitzpatrick 0163059814 sqlindex: don't iterate in small 50-row batches on big prefixes
This speeds Camlistore start-up index slurping considerably. Instead of
17,000 queries in 30 seconds, it now does 6.

A future change will improve this further, giving sorted.KeyValue impls
a hint about the end range too.

Change-Id: Icb5e2ac6edd580469e907fde4e916c00aba0ffe8
2013-12-07 06:46:02 -08:00
Brad Fitzpatrick 87a85c4543 index: don't log in benchmark, even to ioutil.Discard. just a CPU distraction.
Change-Id: Id4d8b761cd81a7c8abd7e21d139bffc818aff5e1
2013-12-06 10:06:18 +04:00
Brad Fitzpatrick 67a9cfd68c index: let index-row-to-corpus merger funcs have a []byte version
Saves a lot of allocations and garbage.

Change-Id: Ic9dfb050a54323312056e8b69e93dfe7aaf715a8
2013-12-04 23:58:59 +04:00
Brad Fitzpatrick 11a1745034 Add KeyBytes and ValueBytes accessor to sorted.KeyValue.Iterator.
Goal is to iterate faster (notably: for slurping the index to the in-memory
corpus on start-up), by doing fewer copies and generating less garbage.

Change-Id: I054b0de2b994eb1f2356aa8587a466bafeb6cf82
2013-12-04 14:18:52 +01:00
Brad Fitzpatrick 098ab8645a index: add BenchmarkCorpusFromStorage
Change-Id: Ifba96f21d5a003150062d988129c2c24fcae878c
2013-12-03 21:56:34 -08:00
Brad Fitzpatrick 429fa4bf4e Fix API typo: ParseTime3339OrNil, not OrZil
Change-Id: I1255cf4560d133fe5c6128fba0be2d9d4a0c0daa
2013-12-03 21:56:09 -08:00
Brad Fitzpatrick de3de4c499 index: remove 2 allocs (3% of mem) in kvClaim, via Corpus.mergeClaimRow
And some tests.

Change-Id: Ifd57b027e193d0356bca140c93c18963be664bae
2013-12-03 21:52:12 -08:00
Brad Fitzpatrick fb14b09441 index: let benchmarks disable some expensive memstats
Change-Id: I0138148ffa2543985bb78fb69ac2b122b50d0a04
2013-12-03 21:38:03 -08:00
Brad Fitzpatrick bf4d2721ba search: efficient permanode queries, sorted, and with a limit.
Change-Id: I7f8edfe3636ff3f1344ebb41e27d23073c630ff5
2013-12-02 20:01:37 -08: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 91d735df4b index: start of re-indexing smartly when dependent blobs are missing
See https://camlistore.org/issue/102

Change-Id: Ia5f69475d8f47398bc228a96e7694d59edf277bf
2013-11-30 23:15:17 -08:00
Brad Fitzpatrick 778f5cc6c4 index: show corpus building CPU usage, disabled blob.Parse cache, size maps
Change-Id: I089053e8de46978573e4b5fe5cdc14ccac0d54a2
2013-11-30 12:04:04 -08:00
Brad Fitzpatrick ecc5759758 kvfile: log which db was closed
Change-Id: I932d9b143db0842afe6df55aad8b8c17f85d1254
2013-11-30 09:32:37 -08:00
mpl e288622e01 Merge "pkg/index: do not record a keySignerAttrValue on DelAttributeClaim" 2013-11-29 23:57:59 +00:00
mpl 6c75ceb8b5 pkg/index: do not record a keySignerAttrValue on DelAttributeClaim
Change-Id: Ib1f81fe4879de2be7d484a5a40cc6bf0449893d5
2013-11-30 00:56:09 +01:00
Brad Fitzpatrick 8c46afe490 Shrink camtypes.BlobMeta a bit. Saves 4 bytes of memory per blob.
For me,

Before:
Corpus stats: 148.859 MiB mem: 799465 blobs (89.487 GiB) (282303 schema (6478 permanode, 150962 file (112224 image), ...)

After:
Corpus stats: 146.559 MiB mem: 799465 blobs (89.487 GiB) (282303 schema (6478 permanode, 150962 file (112224 image), ...)

Change-Id: Id421dfc9d72c2a24c228418c01f9a3f05900c941
2013-11-29 13:41:39 -08:00
Brad Fitzpatrick 4eaeee9ae3 Reduce in-memory size of image info dimensions.
For my personal server,

Before:
Corpus stats: 149.884 MiB mem: 787886 blobs (88.853 GiB) (279308 schema (6073 permanode, 150557 file (111819 image), ...)

After:
Corpus stats: 145.172 MiB mem: 787886 blobs (88.853 GiB) (279308 schema (6073 permanode, 150557 file (111819 image), ...)

Change-Id: I47484e46b1eb70c8c4b5ee356cdcb0ceecde94e7
2013-11-29 11:01:41 -08:00
Brad Fitzpatrick 7e24120c5e Intern blob.Refs in the in-memory Corpus.
For me, saves 419054 blob.Refs and 10 MB of memory.  Before/after:

Before:
Corpus stats: 159.057 MiB mem: 787886 blobs (88.853 GiB) (279308 schema (6073 permanode, 150557 file (111819 image), ...)

After:
Corpus stats: 149.884 MiB mem: 787886 blobs (88.853 GiB) (279308 schema (6073 permanode, 150557 file (111819 image), ...)

Change-Id: Idf71011c14d0d9b7457beab86dd084651fc3b122
2013-11-29 10:47:42 -08:00
mpl 1ee5fd20c5 search: deletions are not modifications
1) pkg/search: documented that deletions times do not
qualify as modtimes

2) pkg/index: got rid of DeletedAt, and keyDeletes

http://camlistore.org/issue/191

Change-Id: I39578913345454d36af4599e29e7053f46577846
2013-11-29 00:29:57 +01:00
Brad Fitzpatrick cf837af913 corpus: log more stats on start-up
Change-Id: Iabc97be94e5e3a81b4c377ed143612432f81c230
2013-11-28 11:55:52 -08:00
mpl fa32346860 pkg/index: check for deletions in EdgesTo
Also introduced and used kvEdgeBackward

http://camlistore.org/issue/191

Change-Id: Ifdca9f2453ec0c7db55afc40cf0b5f1441b83158
2013-11-28 19:41:40 +01:00
mpl 2095a2c913 pkg/index: another delete test case
This test verifies that a permanode is still considered
deleted until all its deleters have been deleted.

http://camlistore.org/issue/191

Change-Id: Ifa4f17f031884b766d9ac90f1643a62ada591ae5
2013-11-28 16:34:49 +01:00
mpl 8ee50244f3 Merge "pkg/index: use IsDeleted in some of the search methods" 2013-11-28 15:11:11 +00:00
mpl 15bb5f142e pkg/index: use IsDeleted in some of the search methods
1) Done in AppendClaims, PermanodeOfSignerAttrValue,
SearchPermanodesWithAttr, PathsOfSignerTarget,
and PathsLookup.

2) camtypes.Path.DateClaim is now a time.Time, and used
as such in Path search methods.

3) Added kvSignerAttrValue, kvPathBackward, and kvPathForward

4) More Delete tests. We probably want more cases, but that's
a start.

http://camlistore.org/issue/191

Change-Id: I1d42485f2c6d1eea024f70378daacaaad9197768
2013-11-28 16:08:23 +01:00
Brad Fitzpatrick f1558f69b2 index: don't allow schemaVersion 0 if the index is non-empty
Change-Id: Ifaf3fb6c4f4166028fdf9041abb274f6cb8998ca
2013-11-27 21:31:05 -08:00
Brad Fitzpatrick d2cd51a6ff corpus: print out Corpus memory/size stats
Change-Id: I3e9ed323473488a76992e5d5a9429b7fef5fa9b2
2013-11-27 16:58:05 -08:00
Brad Fitzpatrick 1ec41b95f0 Speed up in-memory permanode attribute search.
Finishes Corpus.AppendPermanodeAttrValues and uses it in
PermanodeConstraint.

Change-Id: I031789e0974add24886cc0060e52ba538535c4e1
2013-11-27 12:47:04 -08:00
Brad Fitzpatrick 3730cbafbb Merge "pkg/index: update the deletes cache when receiving a delete claim" 2013-11-27 18:29:02 +00:00
mpl 5f966c2f99 Merge "pkg/index: change deletes cache structure and meaning" 2013-11-27 17:45:52 +00:00
mpl 42e37d4456 pkg/index: update the deletes cache when receiving a delete claim
http://camlistore.org/issue/191

Change-Id: I49da2ef4e43675fba6a80db29ba96a473c159403
2013-11-27 18:44:39 +01:00
mpl 45b630f766 pkg/index: change deletes cache structure and meaning
1) The deletes cache now simply reflects all the keyDeleted index entries,
instead of trying to always hold the computed deletion state of the
blobs.

2) The IsDeleted and DeletedAt methods have been changed accordingly.
Moreover, while they previously were only taking into account the most
recent delete claim that affected the input blob, they now take
into account all delete claims that concern said blob.
In other words, a blob is considered "active" only if all of its past
deleters are deleted too (or it does not have any deleter).

http://camlistore.org/issue/191

Change-Id: I1b276dac0b3c6a3fb3beaf96828a45a85d27e4c6
2013-11-27 17:02:03 +01:00
Brad Fitzpatrick c819397cd5 corpus: keep permanode claims sorted in memory
Change-Id: Ic0387a3789c10036e21f5e2eb10101a0ae23b0b7
2013-11-27 00:32:24 -08:00
Brad Fitzpatrick 1eff3b0a34 Merge "search & index: change 'before' logic, and tests." 2013-11-27 06:29:04 +00:00
Bill Thiede 0e00fd6198 search & index: change 'before' logic, and tests.
Change-Id: I62f43f26b295c46b9da63efe018d324f9105606b
2013-11-26 21:51:06 -08:00
Brad Fitzpatrick c4b7d70ac3 corpus: start of work on AppendPermanodeAttrValues for permanode attr search
Change-Id: I969778420474e3413813bb49b1bfd095d9a12389
2013-11-26 20:28:14 -08:00
Brad Fitzpatrick 9a749ce73b search: efficient in-memory scans of permanode modtimes
Change-Id: I82d34544a86cd9f3a52c2b7140dd89eac32fbfa9
2013-11-26 19:47:00 -08:00
Brad Fitzpatrick a918fac281 search: let GetRecentPermanodes take a before param.
For infinite scroll.  Will be done better later, but this works for now.

Change-Id: I88dc7793b643226a4a5e3a583c5de5d4c7fa4819
2013-11-25 20:35:59 -08:00
Brad Fitzpatrick 9aaadc73b8 index: put ImageInfo in memory too
Change-Id: I8110df05dd14ec3ede2e49902b172ed9bf069bfb
2013-11-25 19:46:28 -08:00
Brad Fitzpatrick 2fb3d06d49 Remove dependency on the testing package from pkg/index. Polluted flags.
Change-Id: Id5492fcab022c03e40501830d9253b5605a14ee6
2013-11-24 17:45:45 -08:00
Brad Fitzpatrick 1f407edd58 sorted: add Close method to KeyValure; register 'kv' impl type for cznic/kv
Change-Id: Ie4e21450dac9dad3433c65631706f52527502cbc
2013-11-23 21:07:03 -08:00
Brad Fitzpatrick 90c1e48afe Rename index.Storage to sorted.KeyValue and move it into a new package.
Having index.Index and index.Storage both in the same package led to
confusing discussions about "an index". Better names now, and smaller
packages.
2013-11-22 23:24:54 -08:00
Brad Fitzpatrick a57de74641 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2013-11-22 12:57:55 -08:00
Brad Fitzpatrick e25db602ba Register the 'memory' index type.
Change-Id: If697de1c3c63b2a1990353fc3ba1713f89e27d50
2013-11-22 12:57:45 -08:00
Brad Fitzpatrick c5037b76e6 Fix thumbnails, broken in cb31dd58d2
Change-Id: I82defd54f53d4f6c1a594185d5e9b7d3a4a92c07
2013-11-20 17:44:10 -08:00
Brad Fitzpatrick 838a59c56f Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2013-11-19 15:28:20 -08:00
Brad Fitzpatrick bbabdfc8a6 index: move Storage interface to its own file, start of constructor registration system
Change-Id: I49547ec8cd12e2f559876fa17063d7f16e73195d
2013-11-19 15:28:13 -08:00
mpl c81f3147f6 pkg/index: write relevant keys when receiving a delete claim
This change:

1) Checks if the incoming claim is a delete claim with the use
of GetBlobMeta.

2) write the keyDeleted and keyDeletes keys when it's a delete
claim, plus the usual keys when the target is a permanode.

Yet to be done in the next CLs:
1) update the index deletes cache upon reception of a delete claim
2) update most of the search functions so they use deletedAt properly
3) add new keys necessary for GetRecentPermanodes to give a fully
correct result.

I also made indextest.DumpIndex public because it turned to be useful
to debug within pkg/search/ as well.

http://camlistore.org/issue/191

Change-Id: I8d8b9d12a535b8b1de0018b4a0e359241f14d52a
2013-11-19 18:02:12 +01:00
Brad Fitzpatrick cb31dd58d2 In-memory search: include FileInfo. More tests pass.
Change-Id: Ic33357b63d1d57dc174fe18360e920730016c903
2013-11-17 19:49:19 -08:00
Brad Fitzpatrick e8603b1293 Put claims in memory too for in-memory search. Required index schema version bump.
Change-Id: I194d65476bddea111277cd0b1472c56b5527226b
2013-11-17 16:52:51 -08:00
Brad Fitzpatrick 0b07171c0c index: change GetOwnerClaims interface for efficiency, rename to AppendClaims
Change-Id: Icec235961ed8a09256df87c5fe1455cbad81ae3f
2013-11-17 14:54:30 -08:00
Brad Fitzpatrick 8abaddfa80 index: rearrange interface definition.
more stable stuff at the top. stuff that needs a re-think below.

Change-Id: Id1682b393718a2e9928088d38a4ddea477698e98
2013-11-17 13:44:49 -08:00
Brad Fitzpatrick 04a116fed0 TODOs
Change-Id: I6a7866d889f7446bc89c25a19c57d0c8220bf99f
2013-11-17 11:01:09 -08:00
Brad Fitzpatrick d82f02db50 Search optimization: keep blobs arranged by camliType in memory; use when possible.
Change-Id: I8b3ebcf7dfece21d17074da32dc20e4d600e4c50
2013-11-17 10:52:37 -08:00
Brad Fitzpatrick 8e8ac9092a corpus: add a generation number for future query caching
Change-Id: I07dd61756537688f4f5e68bbcaf93bff75aaddc9
2013-11-17 10:05:40 -08:00
Brad Fitzpatrick 3eb493599e in-memory search: better structure for keeping memory corpus and kv
index in sync, both at start-up and while running and receiving blobs.
They both use the same mechanism now.

Also adds KeyId to the index and Corpus, as the next step. Plenty more
row types remain...

Change-Id: Id79955ba25dc79d5fbd94b0e5248d33dcf71d97e
2013-11-17 09:41:45 -08:00
Brad Fitzpatrick 272db6545a index: change GetBlobMIMEType to GetBlobMeta. mime types on a blob was wrong anyway.
And some more of in-memory search, which this makes easier / less garbage-y.

Change-Id: If1fa7dd44842244ae5e5440f84e92d66dc3321fb
2013-11-16 19:40:14 -08:00
Brad Fitzpatrick f3cc3c7ed9 search: more in-memory search work. make tests verify Scan doesn't hit Storage.
also some string interning work.

Change-Id: I7864b56eb97318bce943afdca3b1212f4729a9a8
2013-11-16 18:50:01 -08:00
Brad Fitzpatrick e26eacfa2f index: return FileInfo and ImageInfo as values, not pointers.
Change-Id: I6aba3a74ce233cc834550b561f597e549fb2bfab
2013-11-16 17:49:28 -08:00
Brad Fitzpatrick 2984897ac7 search: more in-memory search work.
keep blob metadata in memory, and start of testing all search queries in three modes:
classic index.Storage scanning, all in-memory with corpus scanned from the index.Storage,
and the in-memory corpus built up over time as blobs arrive.

Change-Id: I40536e498a63bece5bd4897cdbbd0cef78085f44
2013-11-16 17:24:02 -08:00
Brad Fitzpatrick c573feb226 Make the search handler conditionally request the index be slurped into memory.
Change-Id: I7fadeba41c3b1bbcfbb0fd3470ff30cdf04b1b90
2013-11-16 15:18:16 -08:00
Brad Fitzpatrick 705107ad80 search/index: invert depedency. search now depends on index.
creates new package types/camtypes for misc types needed by both. might eventually go away as
search matures.

Change-Id: Ib771ead7bea39936ba478b7e5d58de997060861b
2013-11-16 15:00:30 -08:00
Brad Fitzpatrick 25eca52283 Merge "pkg/search: add modtime in WANT to fix tests" 2013-11-16 22:26:28 +00:00
Brad Fitzpatrick 2a42678f0c index: start of optional support for keeping index all tightly in-memory for search
Change-Id: Ie7fbafa1376505d10b0c01470089d260a0c0f97f
2013-11-16 12:55:09 -08:00
Brad Fitzpatrick 8a5161ec30 search: multiple constraints at top level
Change-Id: I964a0d394c3c03e2409c91fb1d240847ff07ddb3
2013-11-16 11:21:30 -08:00
Brad Fitzpatrick 1e627ce7c3 search: change BlobMeta to have a CamliType, not a misleading MIMEType.
Change-Id: I1c6e111ef27aafd5a15f9b38746361093a78e9e6
2013-11-16 10:35:18 -08:00
mpl 01a8dbb163 pkg/search: add modtime in WANT to fix tests
Also fixed fakeindex clock to use a time.Time.
And synchronized the fakeindex and the indextests clocks to the
same origin.

Change-Id: I986abca300d61241069132619028f470cacd61da
2013-11-15 23:31:24 +01:00
mpl e03d923fe1 pkg/index: use a map to populate the mutations
When indexing upon a blob reception, we first populate
all the mutations in a map instead of in a batch mutation.
Then we transfer all the mutations in a batch and commit
it immediately. This makes the window when the batch mutation
is open much shorter, and will ease future indexing because
it allows reading from the index while writing the mutations
to the map.

Change-Id: I276282388f59ca543835bfa5ec64986453b23fe1
2013-11-15 01:23:21 +01:00
Brad Fitzpatrick d6a10c18f2 index: doc tweak
Change-Id: I30836b1a6967ac86f7f16118a9bf81a293b09a27
2013-11-09 19:20:21 -05:00
mpl 5031b01880 pkg/index: keyType keyPermanodeClaim for "claim" index entry
The index entry prefixed by "claim" had no keyType and
was always built "by hand" with pipes concatenation.
This change adds the documented keyPermanodeClaim to fix
that.

Change-Id: Ic59f7dbcccc6b223b155d5bffbf8e636209800cb
2013-11-08 16:20:43 +01:00
mpl fdaf030bc0 index: add deletedAt method, and cache for deletion status
This method will be used to find out when a permanode or claim
was (un)deleted for the last time.

This change also introduces the keyDeletes index entry which
allows to find the permanodes/claims that a delete claim deletes.

Finally, since some index keys have changed, this CL introduces
a check for an index schema version, to force users to reindex
when needed.

http://camlistore.org/issue/191

Change-Id: I6f8e5d3030a6ddc8b21ff5dc5db311f2ea16f613
2013-11-06 23:34:13 +01:00
Brad Fitzpatrick 17ecf8df07 search: start of general Query support. very rough draft.
Start of something that builds and 'works', but barely fleshed out at all.
Likely to change drastically yet.

Change-Id: I7fba25528a341ff2dbbc4dbb579f2450d7889320
2013-10-18 17:17:35 -07:00
mpl 304f5c4b38 camput attr: support -del
Change-Id: I28460fed5b572ba9a83cfcb04f38e42124fa723f
2013-10-03 15:07:43 +02:00
Brad Fitzpatrick 2b9db0a859 kvfile: say which lock file couldn't be acquired.
Still not a great error message, though.  Should say pid or something.

Change-Id: I4382f23e62e58f8fd472e8d84c3555f4f951d90d
2013-09-22 20:14:23 +01:00
Brad Fitzpatrick 8319411ab4 Convert more ReceiveBlob into blobserver.Receive or blobserver.ReceiveNoHash
Change-Id: I9199555324b617167a6062a8b55ed09b449bae4f
2013-09-16 15:57:14 +01:00
Brad Fitzpatrick b34c6198e4 sqlite: add start of an fd leak test
Change-Id: I84857e7a57bc4d95fa1a0ddc1c7538d1924cb93a
2013-09-13 11:21:48 +01:00
Brad Fitzpatrick afb81d0f5d Add checker for iterator Close calls
Change-Id: I90ba84635dd55ee056acedb8d0c0f5fa5d2a0ef5
2013-09-12 18:13:29 +01:00
mpl 6cf55d78b0 index: GetDirMembers, forgot to close iterator
Could fix too many open files problem with sqlite reported by ajft

Change-Id: Icde85b11dcd96a336d1bba1e15a7665a1b4a874a
2013-09-12 16:35:12 +02:00
mpl d488c576fc search: support for static directory children
This change introduces a new index entry
to help with finding the children of a static directory.
It also fixes ResolvePrefixHop so that it takes
into account static directories, and not only collections.

This is the first step to support publishing static directories.

http://camlistore.org/issue/179

Change-Id: I5666e5caa6c782004054ae4c19a6b6119d4fda8b
2013-09-10 23:06:48 +02:00
Brad Fitzpatrick 00d8ff5275 index: remove now-longer-necessary blob hash check
Change-Id: Ia2a79655832a840d37666b94a1f101042861c8ff
2013-09-08 12:38:20 -07:00
Bill Thiede 630f6ca61f Document environment variables usage.
Running 'go run dev/envvardoc/envvardoc.go' now shows:
'All environment variables are documented'

I also took the liberty of cleaning-up our mishmash of logic for handling
boolean environment variables, and cleaned up a couple other spots that didn't
seem right.

This change adds docmentation for all variables starting with (CAM|DEV|AWS).
This leaves some variables still undocumented.  If there are variables worth
documenting in the following list, maybe we should rename them to have a
CAM{LI} prefix for consistency's sake:

APPDATA                  pkg/osutil/paths.go:86
APPDATA                  pkg/osutil/paths.go:102
DISPLAY                  pkg/misc/gpgagent/gpgagent.go:126
GOPATH                   pkg/fileembed/genfileembed/genfileembed.go:321
GOPATH                   pkg/osutil/paths.go:168
GOPATH                   pkg/test/world.go:54
GOPATH                   server/appengine/build_test.go:77
GPGKEY                   cmd/camput/init.go:77
GPG_AGENT_INFO           cmd/camput/init.go:153
GPG_AGENT_INFO           pkg/misc/gpgagent/gpgagent.go:50
HOME                     pkg/jsonsign/keys.go:79
HOME                     pkg/jsonsign/signhandler/sig.go:64
HOME                     pkg/osutil/paths.go:36
HOMEPATH                 pkg/osutil/paths.go:34
PKG_CONFIG_PATH          pkg/index/sqlite/dbschema.go:59
RUN_BROKEN_TESTS         pkg/fs/fs_test.go:67
SKIP_DEP_TESTS           pkg/test/testdep.go:29
TERM                     pkg/misc/gpgagent/gpgagent.go:133
TERM                     pkg/misc/pinentry/pinentry.go:99
TESTING_PORT_WRITE_FD    pkg/webserver/webserver.go:135
TEST_GPGAGENT_LIB        pkg/misc/gpgagent/gpgagent_test.go:27
USER                     pkg/netutil/ident.go:135
USER                     pkg/osutil/paths.go:45
USERNAME                 pkg/jsonconfig/eval.go:228
USERNAME                 pkg/osutil/paths.go:43
VERBOSE_FUSE             pkg/fs/fs_test.go:133
VERBOSE_FUSE_STDERR      pkg/fs/fs_test.go:137
XDG_CONFIG_HOME          pkg/osutil/paths.go:104

Change-Id: Ief28710d3deefd1e65247cb5d3b1d8dde73e1f2d
2013-09-06 21:54:03 -07:00
Brad Fitzpatrick 3030e55db3 Merge "Basic code to index id3 (and other audio) tags." 2013-09-02 19:26:34 +00:00
Hunter Freyer 6940b3991f Basic code to index id3 (and other audio) tags.
Does a few things:

1) Adds gotaglib to third_party. If you'd like to review that, feel
free, though there's a bit of organization I'd like to do first.

2) Adds an "audioTag" key type.

3) Indexes wholerefs by various audio tags. Doesn't yet add a map from
wholeref to tags, but I can add that next.

Change-Id: I8e2a5bc27260086bad3351ac57973d1ac23cff44
2013-09-02 14:39:51 -04:00
mpl 3a26c433db devcam: 'put' and 'get' commands, replace dev-camput and dev-camget
Also added -port flag, and untied the port to the
password in devcam server, always 'pass3179' now.

http://camlistore.org/issue/212

Change-Id: Iadf693951763d47907be17c53d4807a4706eb150
2013-09-01 10:25:09 -07:00
Brad Fitzpatrick e20c7f44a8 auth: fix security problem where 'localhost' allowed all access.
Also, add tests. And remove CAMLI_ADVERTISED_PASSWORD, replacing it with explicit devauth mode.

Change-Id: I9cdfe2d537ecefcf75df0b9fb8538258703b1eb7
2013-08-31 13:44:44 -07:00
Brad Fitzpatrick 6d761897db Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2013-08-28 12:16:37 -07:00
Brad Fitzpatrick f0d4a61b6a Use osutil.Username in more places.
Change-Id: Id1154fc16c98b3c72d425a4a8adae9c6c0bb2c04
2013-08-28 12:00:17 -07:00
Brad Fitzpatrick ca64e4f508 camlistored: on SIGINT, shut down cleanly, closing the kvfile index db
Change-Id: Ifcb8c22b088586bc72ad98dacc3be2d46e77928b
2013-08-26 21:07:28 -05:00
Brad Fitzpatrick c55bf01f84 Move osutil.Lock to its own package
Now in a small repo at github.com/camlistore/lock and brought into our third_party.

Change-Id: I966ca6126dde8b7c2e03f0d9fab1e36abd66c2ef
2013-08-25 19:53:01 -05:00
Brad Fitzpatrick 87451bb5bd index/kvfile: use new Locker hook in kv to use osutil's Lock func
Change-Id: I7573ea79f5f99ef1b7fe03bd9270b61940339a56
2013-08-25 12:56:36 -05:00
Brad Fitzpatrick 4fa8c3117a Add pkg/index/kvfile: index.Storage impl on top of github.com/cznic/kv
Change-Id: I4adb44c4e70ad8e68b4292fefbbd02e0a52beb6c
2013-08-23 17:13:42 -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
mpl f4ef8c0375 dev-server: remove. replaced by devcam server.
Fix related docs, config files, buildbot...

Change-Id: I638d3856f42953603b13204fb56782974d0db9ee
2013-08-03 01:12:38 +02:00
Brad Fitzpatrick eb1208a12e sqlite: updated ErrNotCompiled installation hint
Change-Id: I96a5fde5bf3d34cc29f38180272a624c353a6c4f
2013-07-28 18:23:04 -07:00
Brad Fitzpatrick 9468e5ba70 More docs. Every package is documented now.
misc.CountingReader moves into readerutil.

pkg/atomics is folded into pkg/types.

pkg/test/testdep is folded into pkg/test, with better name/docs.

Old cruft from pkg/webserver is deleted.

Change-Id: I3f72d8b29804254ef944995fb085837c878f79f5
2013-07-07 21:12:30 -07:00
Brad Fitzpatrick 62ad21ff2e Docs and minor cleanups
Change-Id: Ibf1d69c21f53cf4b5b576a0dfefa5d0e7b26264d
2013-07-07 16:09:17 -07:00
Josh Huckabee a5d72541c3 Enhance PostgreSQL support:
* Fix dbinit command in dev server
* Make sslmode configurable in dbinit
* Don't fail on index schema setup when plpsql language already exists

Change-Id: Ic70461963f6266172d21cda8e6f071e2442d7651
2013-06-25 16:48:38 -07:00
Josh Huckabee 65f3079498 Replace github.com/bmizerany/pq with github.com/lib/pq postgres driver.
Change-Id: If62fd5b489696171c8be6b42a988e1c7d0a634d0
2013-06-25 16:13:22 -07:00
Brad Fitzpatrick ded8f8d0d7 Be helpful about how to setup SQLite, especially on a Mac.
Change-Id: I87dbcd077383f0148a8c50f4120e6606139fcacd
2013-06-22 17:51:09 -07:00
Brad Fitzpatrick 537005fa32 encrypt: stat support.
Can now upload encrypted blobs.

Change-Id: Ib39e3b3218c99f139b0ed2b6d4a232160b4e1e64
2013-06-15 16:44:49 -07:00
Brad Fitzpatrick ca58d8e2e0 Remove noisy var _ = log.Printf lines.
Change-Id: Ia58b8ef5f271f542ae4fe61c7fb1497322770322
2013-06-14 12:55:55 -07:00
mpl a32b4a10be Merge "sqlite: Write-Ahead Logging, for improved concurrency" 2013-06-12 15:00:30 +00:00
Brad Fitzpatrick 7fd16c5df4 remove debugging
Change-Id: If83580e85cfb350bba059dde9e7bccb0c7658e99
2013-06-10 19:23:34 +02:00
mpl a4aba6671a sqlite: Write-Ahead Logging, for improved concurrency
http://camlistore.org/issue/114

Change-Id: I93c3d48f06a6cb0703bd9ce3f89b03fc59826a73
2013-05-01 18:04:03 +02:00
mpl be2fd70e3c index: set MySQL to binary charset
The immediate concern was to make the index case sensitive,
but the values should be stored in binary anyway as this
layer is just obeying the IndexStorage interface and should
not be concerned with character sets.

http://camlistore.org/issue/130

Change-Id: Iee913b0bd9e5c0c32a5c5570310c2ac5d0cfddf8
2013-04-18 00:59:17 +02:00
mpl 0dfd84a7d8 search handler: return correct thumbnail dimensions
images: DecodeConfig to get the predicted width
and height after EXIF correction
search&index: add GetImageInfo and use it in search
to predict the thumbnail dimensions

http://camlistore.org/issue/115

Change-Id: I358136a2ab03ea09c8f8fd2fa0dc574921c819c5
2013-03-25 17:06:15 +01:00
Brad Fitzpatrick ace9474d95 index: index file times too, and return in index.GetFileInfo.
Change-Id: I59d91f0938c725a4cbdf5ca933cdff3529e25f5f
2013-02-18 21:31:41 -08:00
Brad Fitzpatrick 059b21f4d2 Merge branch 'master' of ssh://camlistore.org:29418/camlistore 2013-02-18 13:14:35 -08:00
Brad Fitzpatrick a74a3ec716 Add a version of dude.jpg with EXIF info.
Change-Id: Ic6d23d027690d56c97a800d411b125fbe2c4fb7e
2013-02-18 13:14:29 -08:00
Brad Fitzpatrick 8155b3867a Fix case of MimeType to MIMEType, per Go style.
Change-Id: I6c67a61cea2c71d7fa5d52c4ae283e33e993fd0f
2013-02-18 11:16:13 -08:00
Brad Fitzpatrick 2fd4a22694 Make sqlite (more) reliable. camlistore.org/issue/114
Change-Id: Ia759de784bf4363bd9f5141ddddfa2a441a53f1d
2013-02-17 22:10:28 -08:00
Brad Fitzpatrick 9720652971 Add disabled failing test for http://camlistore.org/issue/114
Change-Id: Iae5dbf1f28ca89793f43bc5e2df2493cf2747a77
2013-02-17 21:42:50 -08:00
Brad Fitzpatrick 14239a5c23 index: cap reindex parallelism
Change-Id: Iaf8a54a547e7d74f9b3702901180b2253aef58aa
2013-02-07 21:02:42 -08:00
Brad Fitzpatrick 51d79e8759 index: re-index on file failure. Issue 103.
Change-Id: I740dbcf951d865df32c2f54d9d4119af135713db
2013-02-07 19:31:44 -08:00
Brad Fitzpatrick cfc32e4a05 schema, camget: more work on deleting the Superset type.
not much more remains.

Change-Id: I6cfe4145f67b100a0e2509f88ce6e1c580b7f9fe
2013-01-22 09:32:40 -08:00
Brad Fitzpatrick 1bf01d7315 schema: lot of Blob/Builder work, and kill schema.Map.
Next up: unexport schema.Superset.

Change-Id: Ia4bb34790abba75bdb4d4101df7a4f15875f4237
2013-01-21 20:56:12 -08:00
Brad Fitzpatrick 7ceaaa0012 blobref: simplify the FromHash func. Make type implicit.
Change-Id: I2e01c3663bdb1151c11dfc9a1d59c7081940ffac
2013-01-20 13:36:27 -08:00
mpl e95b1637b9 index: added tests for SearchPermanodesWithAttr
Change-Id: I6ad4a8092c5cc173a395a6ec847ba14be3763ca5
2013-01-18 23:24:45 +01:00
Brad Fitzpatrick dd72cd4434 schema: verify no slashes in fileName in FileNameString accessor.
Change-Id: I1b02e67144fed1f80123530786af55c74bd64f36
2013-01-13 20:43:55 -08:00
Brad Fitzpatrick 75360ee9b3 Rename index.IndexStorage to index.Storage, to reduce stutter.
Change-Id: I52b2a8460c3957a1c8211a470e1df9a8dc5b7067
2013-01-13 20:19:36 -08:00
Brad Fitzpatrick 6ca0efac8c camlistored: much better sqlite support, by default, and help/docs/hints 2013-01-10 16:16:10 -08:00
Brad Fitzpatrick 02b8b35b51 Make sqlite support optional and detectable. 2013-01-10 14:29:20 -08:00
Brad Fitzpatrick 5d0290e590 index: typo and more logging
Change-Id: I814939ba7338eefb8ba919cada24feed8249d3dd
2013-01-09 14:21:32 -08:00
mpl 67c5678062 Index directories with "fileinfo", and use this to
find their name in a search request.

Fixes http://code.google.com/p/camlistore/issues/detail?id=79

Change-Id: I755afd8f52dbd2f8a48ba72bed0a6b0192d1dd71
2013-01-09 16:59:04 +01:00
Brad Fitzpatrick 360f63a64b More App Engine index work.
But fail: 2013/01/09 03:38:54 replica: receiving blob, 1 successes, 1 failures; last error = API error 1 (datastore_v3: BAD_REQUEST): ApplicationError: 1 operating on too many entity groups in a single transactio

See http://stackoverflow.com/questions/8251594/how-many-objects-is-too-many-for-in-a-single-transaction-to-googles-datastore

Sigh.

Change-Id: I90dff1b6bd40a00b4be19c5599583d2131b739d4
2013-01-08 19:43:09 -08:00
Brad Fitzpatrick 898e522126 Close FileReaders. Hunting an fd leak, but this isn't it,
since FileReader.Close is back to doing nothing.

Change-Id: I65e906d75cf2825b9476ed5008ce042f44582113
2012-12-31 18:02:13 -08:00
Brad Fitzpatrick e3247edafb Change blobref.SeekerFromStreamingFetcher signature to not return an error.
Change-Id: I77f693e3b3d0d116e08bca3d3f4cb45ef2a00b27
2012-12-25 10:27:35 -08:00
mpl cd32b0b5b9 move findGoPathPackage to osutil, and use it to define closureDir
Change-Id: I838a2e665591d13ecf3bb2689df1931d7e14465b
2012-12-13 12:31:56 +01:00
Brad Fitzpatrick 43e240f0f6 Fix mymysql for Go 1.1; see https://code.google.com/p/go/issues/detail?id=4476
Change-Id: I6b5d66b68715f7d71ce665dbf90dfc0d4eefab5a
2012-11-30 22:09:51 -08:00
mpl d1e5a1d4c6 search UI: find all roots
This change allows to find all roots (permanodes with the
"camliRoot" attribute) from the search.html ui page.
To achieve that, func (x *Index) SearchPermanodesWithAttr
now uses a prefix string without the query part if the
query is "".

http://code.google.com/p/camlistore/issues/detail?id=35

Change-Id: I396fba683e6e7b2296d1f0df8009c07e3c2cd09d
2012-11-14 11:11:40 +01:00
Brad Fitzpatrick 3057358cfc Index the dimensions of images. 2012-11-07 23:54:00 +01:00
Brad Fitzpatrick 832b774025 search: add EdgesTo handler and tests 2012-11-05 15:09:34 +01:00
Brad Fitzpatrick f696007a14 index: implement EdgesTo
For finding back references in the graph.
2012-11-05 10:29:42 +01:00
Brad Fitzpatrick e783ad1717 Add another search handler test, for recent permanodes.
Change-Id: Iaf40cd94aba7b96c16fa1b04c2bfcebdfeea870e
2012-11-04 15:26:13 +01:00
Brad Fitzpatrick 933375019d Remove *testing.T from IndexDeps constructor; use Fataler interface
Change-Id: I1cfcc2fa8059dca3f4e082c1dae896974d3d0e02
2012-11-04 12:27:45 +01:00
Brad Fitzpatrick 17a3faf2df index: export NewMemoryIndex
Change-Id: Iaa6d3268ce0f6c531e37c97799deeb31c11eabdb
2012-11-04 12:18:11 +01:00
mpl 295cbade1b Add postgres support
Also added the -short option for make presubmit
because postgres test is too slow.

Change-Id: I6be21c4d4cd67671eb44ab65333fc32c1e261bbd
2012-11-03 19:59:22 +01:00
Brad Fitzpatrick 4b0d2841ee Add search.EdgesTo method to search interface. No implementation yet.
Change-Id: Ie3a9eb91e218e172b195d55cb9c17cb6c8f819ce
2012-11-03 16:08:37 +01:00
Brad Fitzpatrick 69e155af64 Replace panics with t.Fatal
Change-Id: I7a514f4a67dbf44eff2448a423082c528e9ee365
2012-11-03 14:54:53 +01:00
Brad Fitzpatrick d2e2652eea gofmt
Change-Id: Ib9aca9d648317f1f17fce0e5e7dba5315a95c274
2012-11-03 14:54:45 +01:00
Brad Fitzpatrick 1466c77198 Add 'edgeback' key to index, for going backwards.
Change-Id: I43057a6fb96c3e8d9364002288d5c7b9ad2fd034
2012-11-03 14:25:48 +01:00
Brad Fitzpatrick 9b6cb04c6e pkg/index: remove pre-Go 1 trimRFC3339Subseconds
Confirmed it's no longer needed.

Change-Id: I83fdbec205476cd749c668e04b26a304c543e7b6
2012-11-02 13:36:33 +01:00
mpl 8138cf8fd6 mongo: added user:pass style authentication
The mongo indexer didn't have any authentication
scheme, so this change adds the user:pass@host
authentication.
The mongo indexer tests now use the root:root
credentials.

Change-Id: I7867f46e3b5f0a4a1a50f86f26d76c0bfd69e9ac
2012-10-25 00:35:19 +02:00
mpl 83ce85b59f old TODOs
Change-Id: Ifa8877f594e65e081536b97f536106301f5c9836
2012-10-19 23:37:14 +02:00
mpl 6baedb3dc7 delete permanode: defined the keyDeleted index key,
and added check in index searches to exclude deleted
permanodes from the results

Change-Id: I7097e4a5dc893a212c91dff987ad7e505793fda9
2012-10-09 01:29:59 +02:00
Brad Fitzpatrick 11eac8721e Convert more code to use schema.Map instead of map[string]interface{}
Change-Id: I285fd1b0e730ebd32069688a71cb992c43770ade
2012-08-22 03:47:38 +10:00
Brad Fitzpatrick 8c293e34b6 Per Go initialism style, rename Json to JSON 2012-07-28 15:42:56 -07:00
mpl 8a642172ce update mongo
Change-Id: I1fb9c657c799560f030b35203c952745919d02ef
2012-07-02 10:50:09 +02:00
Brad Fitzpatrick 6fec55a384 simplify legacy time code
Change-Id: I643b722adddaa3bfecab6044de2c5a373e5d7dd1
2012-05-13 13:27:11 -07:00
Brad Fitzpatrick 1d3703f7ef Clean up some logging.
Change-Id: I92ff6e68e9866784e643682c5e6db5d03f877c5b
2012-04-22 17:56:52 -07:00
Brad Fitzpatrick 18e53cd72f rename MapToCamliJson to Go style initialism MapToCamliJSON
Change-Id: I674944c9fafa6b78c495d22c525b9ffd0b75dbf9
2012-04-15 07:45:10 -07:00
Brad Fitzpatrick a519105585 index/sqlite: new indexer, using sqlite3
Change-Id: If1405fe3ee7c632c05431f4b0be1077d6d42c4a3
2012-04-13 16:11:16 -07:00
Brad Fitzpatrick da32d8d1e8 fix typo in test name
Change-Id: I565422ee6868893a543525853a8e9c24fb14b9fc
2012-04-13 16:08:40 -07:00
Brad Fitzpatrick 3826cc11be index: fix test by excluding the sqlindex package.
it's not a full index, but just an IndexStorage.

Change-Id: I2a3b7c5705c8a01645f2ac3f97f2621b042ef19c
2012-04-13 14:12:04 -07:00
Brad Fitzpatrick 1186c452ba Split mysql and generic sql index code. (Prep for sqlite indexer)
Untested.

Change-Id: Iaf53abf5bea9087ab2f8f1e2a7cda53b73ae094d
2012-04-09 09:53:57 -07:00
Brad Fitzpatrick 2ac4da75a7 Add SKIP_DEP_TESTS env var to skip tests with depdendencies.
Now all tests pass like this:

bradmac-2:camlistore.org $ SKIP_DEP_TESTS=1 go test ./pkg/...
?       camlistore.org/pkg/auth [no test files]
ok      camlistore.org/pkg/blobref      0.023s
ok      camlistore.org/pkg/blobserver   0.032s
?       camlistore.org/pkg/blobserver/cond      [no test files]
?       camlistore.org/pkg/blobserver/google    [no test files]
ok      camlistore.org/pkg/blobserver/handlers  0.031s
ok      camlistore.org/pkg/blobserver/localdisk 1.693s
?       camlistore.org/pkg/blobserver/remote    [no test files]
?       camlistore.org/pkg/blobserver/replica   [no test files]
?       camlistore.org/pkg/blobserver/s3        [no test files]
?       camlistore.org/pkg/blobserver/shard     [no test files]
?       camlistore.org/pkg/cacher       [no test files]
ok      camlistore.org/pkg/client       0.029s
?       camlistore.org/pkg/errorutil    [no test files]
?       camlistore.org/pkg/fileembed    [no test files]
?       camlistore.org/pkg/fileembed/genfileembed       [no test files]
?       camlistore.org/pkg/fs   [no test files]
ok      camlistore.org/pkg/googlestorage        0.034s
?       camlistore.org/pkg/httputil     [no test files]
ok      camlistore.org/pkg/index        0.298s
?       camlistore.org/pkg/index/indextest      [no test files]
ok      camlistore.org/pkg/index/mongo  0.524s
ok      camlistore.org/pkg/index/mysql  0.020s
ok      camlistore.org/pkg/jsonconfig   0.022s
ok      camlistore.org/pkg/jsonsign     0.155s
ok      camlistore.org/pkg/lru  0.015s
ok      camlistore.org/pkg/magic        0.030s
?       camlistore.org/pkg/misc [no test files]
ok      camlistore.org/pkg/misc/amazon/s3       0.028s
ok      camlistore.org/pkg/misc/gpgagent        0.018s
ok      camlistore.org/pkg/misc/httprange       0.026s
?       camlistore.org/pkg/misc/pinentry        [no test files]
?       camlistore.org/pkg/misc/resize  [no test files]
ok      camlistore.org/pkg/netutil      0.088s
ok      camlistore.org/pkg/osutil       0.016s
ok      camlistore.org/pkg/rollsum      0.027s
ok      camlistore.org/pkg/schema       0.017s
ok      camlistore.org/pkg/search       0.016s
ok      camlistore.org/pkg/server       0.039s
ok      camlistore.org/pkg/serverconfig 0.031s
?       camlistore.org/pkg/test [no test files]
?       camlistore.org/pkg/test/asserts [no test files]
?       camlistore.org/pkg/test/testdep [no test files]
?       camlistore.org/pkg/webserver    [no test files]

Change-Id: I9c9b0ee4f51cbcf785aed665bbb494339dd84261
2012-03-29 18:21:37 -07:00
Brad Fitzpatrick cf2813a5a4 mysql indexer: implement indextest tests & fix Get bug that it found.
also, delete the other index package's testdata symlinks.

Change-Id: Ie848b880b5d7397e8d334e636a358396024ad144
2012-03-29 16:12:12 -07:00
Brad Fitzpatrick 427ef88dc2 mysql indexer: start of tests.
Change-Id: I5df79f57607b5e4fe4f67f79a8e5ba8966e8dec5
2012-03-28 17:15:37 -07:00
Brad Fitzpatrick 2d0e0de553 index: skip dirs stating with _, like _obj
Change-Id: I6c12e2f2740e417fa3858f9872e7ea60843c4877
2012-03-28 16:45:54 -07:00
mpl 95b9622271 Check that all indexer packages have all the required tests
Change-Id: I3c189060bce299235828a9d57a7bb679b05adffd
2012-03-28 10:33:48 +02:00
Brad Fitzpatrick 7f90db0291 rename mysqlindexer to mysql to match import
Change-Id: I23cd9cfc40a0e01cb0086fc5c9a3ad108f3705a8
2012-03-27 09:37:32 -07:00
Brad Fitzpatrick 69328c751f fix camdbinit; use correct mysqlindexer import
Change-Id: I227e219ec32f81a11cc6192cd60de8b89878bedc
2012-03-27 09:17:26 -07:00
Brad Fitzpatrick 10cf23c700 Get the MySQL indexer working again.
It now uses the generic indexing layer, rather than its own schema.
Also, move it under pkg/index/, like mongo.
Also, link in mongo to the main binary.
Not using the tests yet (leaving for mpl :))

Change-Id: I47a2203ca6c0b5244cd458aedec46227c4363c62
2012-03-26 13:57:53 -07:00
mpl f9d0ad487e index packages reorganization
Change-Id: Ie91c4bb5ea02a49e59ad093ac972d84b17a046d4
2012-02-26 13:50:14 +01:00
Brad Fitzpatrick af57ae8ae1 don't fail if mongo isn't available
Change-Id: I60754c1f0ec6a942c77ae9618c9a9ee12071ddb4
2012-02-22 01:23:23 -08:00
mpl 5a2c060409 mongo tests now actually fail when no mongodb running
Change-Id: I470c2184c620fa0bba02001ea6877a95cf53d9d6
2012-02-21 15:25:29 +01:00
mpl d40c9dce1d update memindex: use default for db r/w options,
update secring path in test,
-> all tests in index now pass

Change-Id: I8fdd99aad1d0d009cf99c773801a9ae875b56137
2012-02-21 11:51:54 +01:00
mpl a7c4d1f03a time details
Change-Id: Ic4041956e1d7d3b50fea00ab970a68f3c4c2e80d
2012-02-21 11:01:27 +01:00
mpl 50df48d519 first pass with mgo as indexer
fixed indexer so that it builds as a package
added mgo as a third party
fixed mgoindexer
fixed (hackishly) tests so that they pass
I ignored everything memindex for now

Change-Id: I3c03ecfa859cf92b088a759239278b1c0edaf8aa
2012-02-20 14:40:24 +01: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