[column families] Move memtable and immutable memtable list to column family data

Summary: All memtables and immutable memtables are moved from DBImpl to ColumnFamilyData. For now, they are all referenced from default column family in DBImpl. It shouldn't be hard to get them from custom column family.

Test Plan: make check

Reviewers: dhruba, kailiu, sdong

CC: leveldb

Differential Revision: https://reviews.facebook.net/D15459
This commit is contained in:
Igor Canadi
2014-01-24 14:30:28 -08:00
parent ae16606f98
commit eb055609e4
16 changed files with 256 additions and 216 deletions

View File

@@ -315,7 +315,8 @@ class DB {
int target_level = -1) = 0;
Status CompactRange(const Slice* begin, const Slice* end,
bool reduce_level = false, int target_level = -1) {
return CompactRange(default_column_family, begin, end, reduce_level, target_level);
return CompactRange(default_column_family, begin, end, reduce_level,
target_level);
}
// Number of levels used for this DB.

View File

@@ -357,6 +357,21 @@ struct ColumnFamilyOptions {
// order.
int table_cache_remove_scan_count_limit;
// size of one block in arena memory allocation.
// If <= 0, a proper value is automatically calculated (usually 1/10 of
// writer_buffer_size).
//
// There are two additonal restriction of the The specified size:
// (1) size should be in the range of [4096, 2 << 30] and
// (2) be the multiple of the CPU word (which helps with the memory
// alignment).
//
// We'll automatically check and adjust the size number to make sure it
// conforms to the restrictions.
//
// Default: 0
size_t arena_block_size;
// Disable automatic compactions. Manual compactions can still
// be issued on this column family
bool disable_auto_compactions;
@@ -562,21 +577,6 @@ struct DBOptions {
// The default value is MAX_INT so that roll-over does not take place.
uint64_t max_manifest_file_size;
// size of one block in arena memory allocation.
// If <= 0, a proper value is automatically calculated (usually 1/10 of
// writer_buffer_size).
//
// There are two additonal restriction of the The specified size:
// (1) size should be in the range of [4096, 2 << 30] and
// (2) be the multiple of the CPU word (which helps with the memory
// alignment).
//
// We'll automatically check and adjust the size number to make sure it
// conforms to the restrictions.
//
// Default: 0
size_t arena_block_size;
// The following two fields affect how archived logs will be deleted.
// 1. If both set to 0, logs will be deleted asap and will not get into
// the archive.