Brad Fitzpatrick
3c00ed347c
mongo: test using Docker
...
Under a second to start and test against a real MongoDB instace in Docker:
$ go test -v camlistore.org/pkg/sorted/mongo
=== RUN TestMongoKV
--- PASS: TestMongoKV (0.79 seconds)
PASS
ok camlistore.org/pkg/sorted/mongo 0.791s
Test is skipped in short mode, or if docker isn't available.
Change-Id: I6f3acc96357cf9c50054b3df6727661c9329e6bf
2014-02-09 20:02:56 -08:00
Bill Thiede
fe25884b71
pkg/sorted/kvfile: faster wipe.
...
Delete the underlying DB file instead of iterating over the contents and
deleting item by item.
Change-Id: I1328c44b447ba9b1dc1cf81fdaf1f2437f80a071
2013-12-24 21:27:49 -08:00
Brad Fitzpatrick
289065c730
sorted/kvfile: make it actually compile
...
Change-Id: I0a3916c1c260dfac6b3444a18510a013d429ef33
2013-12-24 15:35:29 -08:00
Bill Thiede
de3a5d1941
pkg/sorted/kvfile: add sorted.Wiper.
...
This allows people with kvIndexFile in their server-config.json to run:
camlistored -reindex
Change-Id: If1008297fa29ca514260529edb2125a1ea7d5246
2013-12-24 13:15:24 -08:00
Brad Fitzpatrick
a11ff22b8e
camlistored: add --reindex flag; make sqlkv a sorted.Wiper
...
Change-Id: I6b16c1c32187fb754d3acdbe852d02a506236078
2013-12-23 19:07:17 -08:00
mpl
8fec95752c
pkg/index: move postgresql to sorted + some fixes
...
Change-Id: Ia6410256ffe8d4cbc2b9a5c056d075707105ab08
2013-12-24 00:37:14 +01:00
mpl
e687136b36
sorted: more tests
...
Adding this particular case, because I suspect it demonstrates
a problem with postgresql.
Change-Id: Ia1ffe2f0a27dede579ed652b9f614cd69adc4418
2013-12-23 15:35:05 +01:00
mpl
62f8a252ff
pkg/index: move mysql to sorted
...
also minor cleanups in sqlite and mongo
Change-Id: I1f371358997d929c72a8f63d2630a1c3fa4a0240
2013-12-18 20:18:20 +01:00
Brad Fitzpatrick
fb933a84cd
Merge "mongo: NewKeyValue now takes a mongo.Config"
2013-12-17 16:12:04 +00:00
mpl
6102ca9a80
mongo: NewKeyValue now takes a mongo.Config
...
Change-Id: Ibfb0085836030592db4373e4ac2540355e67a9c5
2013-12-17 15:18:14 +01:00
Brad Fitzpatrick
f23dc2b20d
sorted: better errors when a constructor fails
...
Change-Id: I9cfbd6742210c3e5efae6b30c7f287d739dff7d2
2013-12-16 20:27:41 -08:00
mpl
b62c94fdd1
pkg/index: move sqlite implementation to sorted
...
Change-Id: I1e300ffa14547fabeac8d255fd694054ebcb9e53
2013-12-16 17:35:27 +01:00
Brad Fitzpatrick
2921a320cb
Merge "index: move kvfile implementation to sorted"
2013-12-13 16:33:38 +00:00
mpl
b86e95caf4
Merge "camtool: dbinit mongo support"
2013-12-13 16:27:49 +00:00
mpl
8c562e9135
camtool: dbinit mongo support
...
Change-Id: I289759ed9bdb34a6e108af1364c4a6bcfbb5982f
2013-12-13 17:25:03 +01:00
mpl
ab5e385113
index: move kvfile implementation to sorted
...
Change-Id: Ie6e676570af088246ef028a2f003b537d85dd6ae
2013-12-13 16:59:45 +01:00
mpl
39996424c7
sorted/mongo: close iter now that we have recent mgo
...
Change-Id: If8e7f2ba611f2d3704acece56e03804bf9bd44f7
2013-12-13 15:44:18 +01:00
Brad Fitzpatrick
bf203d6ff7
Document sorted.Wiper more.
...
Change-Id: Iede5cf3ec12453910594c682a3a18f8c237fbd40
2013-12-13 11:18:27 +04: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
mpl
6c49c746e2
sorted: minor typo
...
Change-Id: I51fc405cc0d8e43f7893b0e088f296126639cb4e
2013-12-10 15:17:36 +01: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
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
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