disable optimization that requires snappy

this causes early test failures when rocksdb is compiled without it
This commit is contained in:
Jacek Sieka 2018-08-15 20:08:03 -06:00
parent 4b73bca449
commit 0f6b9ffe8f
No known key found for this signature in database
GPG Key ID: 6299FEB3EB6FA465
3 changed files with 9 additions and 3 deletions

View File

@ -13,7 +13,9 @@ proc main() =
# get RocksDB to perform well # get RocksDB to perform well
let cpus = countProcessors() let cpus = countProcessors()
rocksdb_options_increase_parallelism(options, cpus.int32) rocksdb_options_increase_parallelism(options, cpus.int32)
rocksdb_options_optimize_level_style_compaction(options, 0); # This requires snappy - disabled because rocksdb is not always compiled with
# snappy support (for example Fedora 28, certain Ubuntu versions)
# rocksdb_options_optimize_level_style_compaction(options, 0);
# create the DB if it's not already present # create the DB if it's not already present
rocksdb_options_set_create_if_missing(options, 1); rocksdb_options_set_create_if_missing(options, 1);

View File

@ -103,7 +103,9 @@ proc init*(rocks: var RocksDBInstance,
# Optimize RocksDB. This is the easiest way to get RocksDB to perform well: # Optimize RocksDB. This is the easiest way to get RocksDB to perform well:
rocksdb_options_increase_parallelism(rocks.options, cpus.int32) rocksdb_options_increase_parallelism(rocks.options, cpus.int32)
rocksdb_options_optimize_level_style_compaction(rocks.options, 0) # This requires snappy - disabled because rocksdb is not always compiled with
# snappy support (for example Fedora 28, certain Ubuntu versions)
# rocksdb_options_optimize_level_style_compaction(options, 0);
rocksdb_options_set_create_if_missing(rocks.options, uint8(createIfMissing)) rocksdb_options_set_create_if_missing(rocks.options, uint8(createIfMissing))
var errors: cstring var errors: cstring

View File

@ -23,7 +23,9 @@ suite "RocksDB C wrapper tests":
let cpus = countProcessors() let cpus = countProcessors()
rocksdb_options_increase_parallelism(options, cpus.int32) rocksdb_options_increase_parallelism(options, cpus.int32)
rocksdb_options_optimize_level_style_compaction(options, 0); # This requires snappy - disabled because rocksdb is not always compiled with
# snappy support (for example Fedora 28, certain Ubuntu versions)
# rocksdb_options_optimize_level_style_compaction(options, 0);
# create the DB if it's not already present # create the DB if it's not already present
rocksdb_options_set_create_if_missing(options, 1); rocksdb_options_set_create_if_missing(options, 1);