rocksdb/db
Igor Canadi 9385a5247e [RocksDB] [Column Family] Interface proposal
Summary:
<This diff is for Column Family branch>

Sharing some of the work I've done so far. This diff compiles and passes the tests.

The biggest change is in options.h - I broke down Options into two parts - DBOptions and ColumnFamilyOptions. DBOptions is DB-specific (env, create_if_missing, block_cache, etc.) and ColumnFamilyOptions is column family-specific (all compaction options, compresion options, etc.). Note that this does not break backwards compatibility at all.

Further, I created DBWithColumnFamily which inherits DB interface and adds new functions with column family support. Clients can transparently switch to DBWithColumnFamily and it will not break their backwards compatibility.
There are few methods worth checking out: ListColumnFamilies(), MultiNewIterator(), MultiGet() and GetSnapshot(). [GetSnapshot() returns the snapshot across all column families for now - I think that's what we agreed on]

Finally, I made small changes to WriteBatch so we are able to atomically insert data across column families.

Please provide feedback.

Test Plan: make check works, the code is backward compatible

Reviewers: dhruba, haobo, sdong, kailiu, emayanke

CC: leveldb

Differential Revision: https://reviews.facebook.net/D14445
2013-12-18 13:08:22 -08:00
..
builder.cc [RocksDB] Use raw pointer instead of shared pointer when passing Statistics object internally 2013-11-25 10:38:15 -08:00
builder.h Fixing the warning messages captured under mac os # Consider using git commit -m 'One line title' && arc diff. # You will save time by running lint and unit in the background. 2013-11-12 20:05:28 -08:00
c_test.c Rename leveldb to rocksdb in C api 2013-12-10 10:48:35 +02:00
c.cc Rename leveldb to rocksdb in C api 2013-12-10 10:48:35 +02:00
corruption_test.cc Make "Table" pluggable 2013-10-28 17:54:09 -07:00
db_bench.cc Add monitoring for universal compaction and add counters for compaction IO 2013-12-12 13:27:43 -08:00
db_filesnapshot.cc Speed up FindObsoleteFiles 2013-11-08 15:23:46 -08:00
db_impl_readonly.cc [RocksDB] [Column Family] Interface proposal 2013-12-18 13:08:22 -08:00
db_impl_readonly.h [RocksDB] [Column Family] Interface proposal 2013-12-18 13:08:22 -08:00
db_impl.cc [RocksDB] [Column Family] Interface proposal 2013-12-18 13:08:22 -08:00
db_impl.h [RocksDB] [Column Family] Interface proposal 2013-12-18 13:08:22 -08:00
db_iter.cc Get rid of some shared_ptrs 2013-12-03 11:17:58 -08:00
db_iter.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
db_statistics.cc Fix #26 by putting the implementation of CreateDBStatistics() to a cc file 2013-12-05 22:29:03 -08:00
db_statistics.h Fix #26 by putting the implementation of CreateDBStatistics() to a cc file 2013-12-05 22:29:03 -08:00
db_stats_logger.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
db_test.cc [RocksDB] [Column Family] Interface proposal 2013-12-18 13:08:22 -08:00
dbformat_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
dbformat.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
dbformat.h Make "Table" pluggable 2013-10-28 17:54:09 -07:00
deletefile_test.cc Start DeleteFileTest with clean plate 2013-11-15 16:30:23 -08:00
filename_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
filename.cc Unify DeleteFile and DeleteWalFiles 2013-10-25 08:32:14 -07:00
filename.h Unify DeleteFile and DeleteWalFiles 2013-10-25 08:32:14 -07:00
log_format.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
log_reader.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
log_reader.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
log_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
log_writer.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
log_writer.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
memtable.cc Introduce MergeContext to Lazily Initialize merge operand list 2013-12-11 11:37:28 -08:00
memtable.h Introduce MergeContext to Lazily Initialize merge operand list 2013-12-11 11:37:28 -08:00
memtablelist.cc Introduce MergeContext to Lazily Initialize merge operand list 2013-12-11 11:37:28 -08:00
memtablelist.h Introduce MergeContext to Lazily Initialize merge operand list 2013-12-11 11:37:28 -08:00
merge_context.h Introduce MergeContext to Lazily Initialize merge operand list 2013-12-11 11:37:28 -08:00
merge_helper.cc [RocksDB] Use raw pointer instead of shared pointer when passing Statistics object internally 2013-11-25 10:38:15 -08:00
merge_helper.h [RocksDB] Use raw pointer instead of shared pointer when passing Statistics object internally 2013-11-25 10:38:15 -08:00
merge_operator.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
merge_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
perf_context_test.cc Killing Transform Rep 2013-12-03 12:42:15 -08:00
prefix_filter_iterator.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
prefix_test.cc Killing Transform Rep 2013-12-03 12:42:15 -08:00
repair.cc Get rid of some shared_ptrs 2013-12-03 11:17:58 -08:00
simple_table_db_test.cc Improve the "table stats" 2013-11-19 16:29:42 -08:00
skiplist_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
skiplist.h Implementing DynamicIterator for TransformRepNoLock 2013-11-08 00:31:09 -08:00
snapshot.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
table_cache.cc [RocksDB] Use raw pointer instead of shared pointer when passing Statistics object internally 2013-11-25 10:38:15 -08:00
table_cache.h Follow-up Cleaning-up After D13521 2013-10-30 10:52:33 -07:00
table_properties_collector_test.cc Move flush_block_policy from Options to TableFactory 2013-11-19 22:00:48 -08:00
table_properties_collector.cc Improve the readability of the TableProperties::ToString() 2013-11-21 17:54:23 -08:00
table_properties_collector.h Improve the "table stats" 2013-11-19 16:29:42 -08:00
transaction_log_impl.cc Fix the string format issue 2013-11-12 21:05:39 -08:00
transaction_log_impl.h Making the transaction log iterator more robust 2013-11-04 20:49:03 -08:00
version_edit_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
version_edit.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
version_edit.h Fix the log number bug when updating MANIFEST file 2013-10-24 21:05:33 -07:00
version_set_reduce_num_levels.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
version_set_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
version_set.cc Move level0 sorting logic from Version::SaveTo() to Version::Finalize() 2013-12-17 18:06:58 -08:00
version_set.h Introduce MergeContext to Lazily Initialize merge operand list 2013-12-11 11:37:28 -08:00
write_batch_internal.h In-place updates for equal keys and similar sized values 2013-10-31 11:27:12 -07:00
write_batch_test.cc Get rid of some shared_ptrs 2013-12-03 11:17:58 -08:00
write_batch.cc [RocksDB] [Column Family] Interface proposal 2013-12-18 13:08:22 -08:00