Igor Canadi 9ab5adfc59 New BlockBasedTable version -- better compressed block format
Summary:
This diff adds BlockBasedTable format_version = 2. New format version brings better compressed block format for these compressions:
1) Zlib -- encode decompressed size in compressed block header
2) BZip2 -- encode decompressed size in compressed block header
3) LZ4 and LZ4HC -- instead of doing memcpy of size_t encode size as varint32. memcpy is very bad because the DB is not portable accross big/little endian machines or even platforms where size_t might be 8 or 4 bytes.

It does not affect format for snappy.

If you write a new database with format_version = 2, it will not be readable by RocksDB versions before 3.10. DB::Open() will return corruption in that case.

Test Plan:
Added a new test in db_test.
I will also run db_bench and verify VSIZE when block_cache == 1GB

Reviewers: yhchiang, rven, MarkCallaghan, dhruba, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D31461
2015-01-14 16:24:24 -08:00
..
2014-11-21 14:11:40 -08:00
2014-10-31 11:59:54 -07:00
2014-11-07 15:04:30 -08:00
2014-08-19 09:52:54 -04:00
2014-08-19 06:48:21 -07:00
2014-11-14 11:38:26 -08:00
2014-11-14 11:38:26 -08:00
2014-11-20 10:49:32 -08:00
2014-08-28 12:46:05 -04:00
2014-08-28 12:46:05 -04:00
2014-09-21 22:20:00 +08:00
2014-11-14 11:38:26 -08:00
2014-11-14 11:38:26 -08:00
2014-07-25 15:17:06 -07:00
2014-09-05 14:14:37 +08:00
2014-07-28 12:10:49 -07:00
2013-12-03 12:42:15 -08:00
2014-07-28 12:22:37 -07:00
2014-11-21 11:05:28 -05:00
2014-04-17 14:29:28 -07:00
2014-09-08 22:24:40 -07:00
2014-10-31 11:59:54 -07:00
2015-01-12 09:59:36 -08:00
2014-05-01 14:09:32 -04:00
2014-05-01 14:09:32 -04:00