basho / eleveldb

Erlang LevelDB API
263 stars 176 forks source link

Snappy support is broken #275

Open benjoe87 opened 1 year ago

benjoe87 commented 1 year ago

Snappy support is broken since https://github.com/basho/eleveldb/commit/6ef920211272a288316f0ffa21cb79350e63effc.

The root cause seems like:

  1. The build flags are not exported in the Makefile
  2. The leveldb build cannot detect the snappy support and don't set the SNAPPY C marco https://github.com/basho/leveldb/blob/develop/build_detect_platform#L169
  3. The leveldb part is builded without snappy support.

It is hard to detect this issue during the tests because leveldb simply do not compress the blocks if snappy support is not present. https://github.com/basho/leveldb/blob/b91d5cee860bc708c10c48911586fdb347558ea3/table/table_builder.cc#L212

But it definitely breaks the upgrades mentioned in https://github.com/basho/eleveldb/issues/273

Exporting these variables probably solves the issue but I am not 100% sure that this is a comprehensive solution.