From 69fdcbb7971937f9e8372add75ed4fe95d50d34d Mon Sep 17 00:00:00 2001 From: mpl Date: Fri, 30 Oct 2015 16:16:52 +0100 Subject: [PATCH] pkg/serverinit: use syndtr/goleveldb in default config Because benchmarks from ./pkg/index/stress seem to show that levelDB is more efficient than kvfile for us. Also changed the filenames to index.kvtype, because the "camli-" prefix is redundant, and because that's how we name the index files in the rest of genconfig.go anyway. Fixes issue #632 Change-Id: If663e94f2c24d646b994c39044eedc9b86327bf2 --- pkg/serverinit/genconfig.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/serverinit/genconfig.go b/pkg/serverinit/genconfig.go index 87473b5a3..2119490f2 100644 --- a/pkg/serverinit/genconfig.go +++ b/pkg/serverinit/genconfig.go @@ -889,7 +889,7 @@ var defaultBaseConfig = serverconfig.Config{ // WriteDefaultConfigFile generates a new default high-level server configuration // file at filePath. If useSQLite, the default indexer will use SQLite, otherwise -// kv. If filePath already exists, it is overwritten. +// leveldb. If filePath already exists, it is overwritten. func WriteDefaultConfigFile(filePath string, useSQLite bool) error { conf := defaultBaseConfig blobDir := osutil.CamliBlobRoot() @@ -898,9 +898,9 @@ func WriteDefaultConfigFile(filePath string, useSQLite bool) error { } conf.BlobPath = blobDir if useSQLite { - conf.SQLite = filepath.Join(osutil.CamliVarDir(), "camli-index.db") + conf.SQLite = filepath.Join(osutil.CamliVarDir(), "index.sqlite") } else { - conf.KVFile = filepath.Join(osutil.CamliVarDir(), "camli-index.kvdb") + conf.LevelDB = filepath.Join(osutil.CamliVarDir(), "index.leveldb") } keyID, secretRing, err := getOrMakeKeyring()