rocksdb/db
Mayank Agarwal 9b50106f9a Dbid feature
Summary:
Create a new type of file on startup if it doesn't already exist called DBID.
This will store a unique number generated from boost library's uuid header file.
The use-case is to identify the case of a db losing all its data and coming back up either empty or from an image(backup/live replica's recovery)
the key point to note is that DBID is not stored in a backup or db snapshot
It's preferable to use Boost for uuid because:
1) A non-standard way of generating uuid is not good
2) /proc/sys/kernel/random/uuid generates a uuid but only on linux environments and the solution would not be clean
3) c++ doesn't have any direct way to get a uuid
4) Boost is a very good library that was already having linkage in rocksdb from third-party
Note: I had to update the TOOLCHAIN_REV in build files to get latest verison of boost from third-party as the older version had a bug.
I had to put Wno-uninitialized in Makefile because boost-1.51 has an unitialized variable and rocksdb would not comiple otherwise. Latet open-source for boost is 1.54 but is not there in third-party. I have notified the concerned people in fbcode about it.
@kailiu : While releasing to third-party, an additional dependency will need to be created for boost in TARGETS file. I can help identify.

Test Plan:
Expand db_test to test 2 cases
1) Restarting db with Id file present - verify that no change to Id
2)Restarting db with Id file deleted - verify that a different Id is there after reopen
Also run make all check

Reviewers: dhruba, haobo, kailiu, sdong

Reviewed By: dhruba

CC: leveldb

Differential Revision: https://reviews.facebook.net/D13587
2013-10-22 12:23:34 -07:00
..
builder.cc Universal Compaction to Have a Size Percentage Threshold To Decide Whether to Compress 2013-10-17 13:33:39 -07:00
builder.h Universal Compaction to Have a Size Percentage Threshold To Decide Whether to Compress 2013-10-17 13:33:39 -07:00
c_test.c Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
c.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
corruption_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
db_bench.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
db_filesnapshot.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
db_impl_readonly.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
db_impl_readonly.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
db_impl.cc Dbid feature 2013-10-22 12:23:34 -07:00
db_impl.h Universal Compaction to Have a Size Percentage Threshold To Decide Whether to Compress 2013-10-17 13:33:39 -07:00
db_iter.cc Fix Bug: iterator.Prev() or iterator.SeekToLast() might return the first element instead of the correct one 2013-10-17 18:33:18 -07:00
db_iter.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
db_statistics.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
db_stats_logger.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
db_test.cc Dbid feature 2013-10-22 12:23:34 -07: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 Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
deletefile_test.cc Dbid feature 2013-10-22 12:23:34 -07:00
filename_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
filename.cc Dbid feature 2013-10-22 12:23:34 -07:00
filename.h Dbid feature 2013-10-22 12:23:34 -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 Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
memtable.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
memtablelist.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
memtablelist.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
merge_helper.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
merge_helper.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07: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 Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
prefix_filter_iterator.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
repair.cc Universal Compaction to Have a Size Percentage Threshold To Decide Whether to Compress 2013-10-17 13:33:39 -07:00
skiplist_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
skiplist.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
snapshot.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
table_cache.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
table_cache.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
transaction_log_impl.cc Disallow transaction log iterator to skip sequences 2013-10-22 11:45:35 -07:00
transaction_log_impl.h Disallow transaction log iterator to skip sequences 2013-10-22 11:45:35 -07: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 Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -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 Universal Compaction to Have a Size Percentage Threshold To Decide Whether to Compress 2013-10-17 13:33:39 -07:00
version_set.h Universal Compaction to Have a Size Percentage Threshold To Decide Whether to Compress 2013-10-17 13:33:39 -07:00
write_batch_internal.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
write_batch_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
write_batch.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00