mirror of https://github.com/perkeep/perkeep.git
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:
parent
a7ccb62bf6
commit
69fdcbb797
|
@ -889,7 +889,7 @@ var defaultBaseConfig = serverconfig.Config{
|
||||||
|
|
||||||
// WriteDefaultConfigFile generates a new default high-level server configuration
|
// WriteDefaultConfigFile generates a new default high-level server configuration
|
||||||
// file at filePath. If useSQLite, the default indexer will use SQLite, otherwise
|
// 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 {
|
func WriteDefaultConfigFile(filePath string, useSQLite bool) error {
|
||||||
conf := defaultBaseConfig
|
conf := defaultBaseConfig
|
||||||
blobDir := osutil.CamliBlobRoot()
|
blobDir := osutil.CamliBlobRoot()
|
||||||
|
@ -898,9 +898,9 @@ func WriteDefaultConfigFile(filePath string, useSQLite bool) error {
|
||||||
}
|
}
|
||||||
conf.BlobPath = blobDir
|
conf.BlobPath = blobDir
|
||||||
if useSQLite {
|
if useSQLite {
|
||||||
conf.SQLite = filepath.Join(osutil.CamliVarDir(), "camli-index.db")
|
conf.SQLite = filepath.Join(osutil.CamliVarDir(), "index.sqlite")
|
||||||
} else {
|
} else {
|
||||||
conf.KVFile = filepath.Join(osutil.CamliVarDir(), "camli-index.kvdb")
|
conf.LevelDB = filepath.Join(osutil.CamliVarDir(), "index.leveldb")
|
||||||
}
|
}
|
||||||
|
|
||||||
keyID, secretRing, err := getOrMakeKeyring()
|
keyID, secretRing, err := getOrMakeKeyring()
|
||||||
|
|
Loading…
Reference in New Issue