basho / eleveldb

Erlang LevelDB API
262 stars 177 forks source link

Use snappy with configurations not explicitly requesting lz4 #216

Closed matthewvon closed 8 years ago

matthewvon commented 8 years ago

Goal for compression defaults:

  1. leveldb open source users: lz4 default
  2. eleveldb open source users: snappy default
  3. riak.conf / app.config users of older generation: snappy default
  4. riak.conf from Riak 2.2: lz4 default

    1 (RIAK-1433) manually verified in leveldb tests.

    2, #3, #4 (RIAK-1556) (RIAK-1556) verified in eleveldb_schema_tests.erl

    4 (RIAK-1556) (RIAK-1556) also verified by building riak from scratch using mv-cuttle-lz4 eleveldb & cuttlefish develop, then "make stage" ... riak.conf has lz4 compression:

mmaszewski@puma:~/riak$ grep compress rel/riak/etc/riak.conf

leveldb.compression = on leveldb.compression.algorithm = lz4 multi_backend.name.leveldb.compression = on multi_backend.name.leveldb.compression.algorithm = lz4

nickelization commented 8 years ago

eleveldb_schema_tests:basic_schema_test needs to be updated with the new default value for compression. Right now that test fails because it expects lz4 but gets snappy:

nmarino@Nicks-MacBook-Pro% rebar eunit suite=eleveldb_schema_tests
==> eleveldb (eunit)
Compiled test/eleveldb_schema_tests.erl
======================== EUnit ========================
module 'eleveldb_schema_tests'
  eleveldb_schema_tests: basic_schema_test...*failed*
in function cuttlefish_unit:'-assert_config/3-fun-2-'/3 (src/cuttlefish_unit.erl, line 77)
in call from eleveldb_schema_tests:basic_schema_test/0 (test/eleveldb_schema_tests.erl, line 37)
**error:{assertEqual_failed,[{module,cuttlefish_unit},
                     {line,77},
                     {expression,"{ Path , ActualValue }"},
                     {expected,{"eleveldb.compression",lz4}},
                     {value,{"eleveldb.compression",snappy}}]}

  eleveldb_schema_tests: override_schema_test...[0.030 s] ok
  eleveldb_schema_tests: compression_schema_test...[0.132 s] ok
  eleveldb_schema_tests: expiry_minutes_schema_test...[0.036 s] ok
  eleveldb_schema_tests: multi_backend_test...[0.079 s] ok
  eleveldb_schema_tests: multi_compression_test...[0.081 s] ok
  [done in 0.447 s]
=======================================================
  Failed: 1.  Skipped: 0.  Passed: 5.
ERROR: One or more eunit tests failed.
ERROR: eunit failed while processing /Users/nmarino/riak/2.2-rc/deps/eleveldb: rebar_abort
fadushin commented 8 years ago

+1 d4b0003