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
This commit is contained in:
mpl 2015-10-30 16:16:52 +01:00
parent a7ccb62bf6
commit 69fdcbb797
1 changed files with 3 additions and 3 deletions

View File

@ -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()