From 0f6b9ffe8f4df0c2dc2f26e09bcaa8e4dc1cce25 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Wed, 15 Aug 2018 20:08:03 -0600 Subject: [PATCH] disable optimization that requires snappy this causes early test failures when rocksdb is compiled without it --- examples/simple_example.nim | 4 +++- rocksdb.nim | 4 +++- tests/test_rocksdb_c.nim | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/simple_example.nim b/examples/simple_example.nim index f571942..699d806 100644 --- a/examples/simple_example.nim +++ b/examples/simple_example.nim @@ -13,7 +13,9 @@ proc main() = # get RocksDB to perform well let cpus = countProcessors() 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 rocksdb_options_set_create_if_missing(options, 1); diff --git a/rocksdb.nim b/rocksdb.nim index d85314a..8aa4b53 100644 --- a/rocksdb.nim +++ b/rocksdb.nim @@ -103,7 +103,9 @@ proc init*(rocks: var RocksDBInstance, # Optimize RocksDB. This is the easiest way to get RocksDB to perform well: 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)) var errors: cstring diff --git a/tests/test_rocksdb_c.nim b/tests/test_rocksdb_c.nim index d21869f..308a7c2 100644 --- a/tests/test_rocksdb_c.nim +++ b/tests/test_rocksdb_c.nim @@ -23,7 +23,9 @@ suite "RocksDB C wrapper tests": let cpus = countProcessors() 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 rocksdb_options_set_create_if_missing(options, 1);