basho / eleveldb

Erlang LevelDB API
262 stars 176 forks source link

add lz4 as option to eleveldb option block [JIRA: RIAK-2707] #208

Closed matthewvon closed 8 years ago

matthewvon commented 8 years ago

This updates the eleveldb.schema file to accept "snappy" and "lz4" as independent options for the leveldb.compression variable. The default value remains "snappy", but end users now have the option to enable lz4 compression.

matthewvon commented 8 years ago

Note: in leveldb, the compression setting in LOG file will be 0 - disabled 1 - Snappy 2 - LZ4 (anything else is a severe bug!!)

JeetKunDoug commented 8 years ago

After a quick discussion with @angrycub we'd rather see this as something like:

eleveldb.compression = on | off 
eleveldb.compression.algorithm = snappy | lz4

Cuttlefish convention generally favors "simple" settings used in combination vs. single complex settings like what is proposed here. Additionally, we then end up with 2 Erlang settings (is compression on or off, and which algorithm should we use) as independent variables, rather than conflating the two into a single thing with on/off/true/false/snappy/lz4 options.

matthewvon commented 8 years ago

somebody know how to code that in cuttlefish? 'cuz the result is the same by the time it hits eleveldb (I believe from other options).

JeetKunDoug commented 8 years ago

@matthewvon I can help you with the change to add algorithm as a thing separate from the compression. I'm sure there are other examples of the above floating around we can use.

bashopatricia commented 8 years ago

create jira issue

JeetKunDoug commented 8 years ago

+1 cc0be0a

Basho-JIRA commented 8 years ago

[~matthewv] Should this story for LZ4 compression for Riak move to "Needs Review" for someone to pick it up and review it? Didn't want to just move it forward without confirming with you.

_[posted via JIRA by Patricia Brewer]_

Basho-JIRA commented 8 years ago

LZ4 options within riak.conf have passed review. Doug requests a new Jira ticket for updating Riak dependency lists with a new eleveldb tag. That tag will be ready tomorrow morning (Wed 8/9).

_[posted via JIRA by Matthew Von-Maszewski]_