Commit Graph

68 Commits

Author SHA1 Message Date
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