https://github.com/facebook/rocksdb
Revision 9b50106f9ae1163c2da55b479bc01035964ac392 authored by Mayank Agarwal on 18 October 2013, 21:50:54 UTC, committed by Mayank Agarwal on 22 October 2013, 19:23:34 UTC
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
1 parent ae8e077
Tip revision: 9b50106f9ae1163c2da55b479bc01035964ac392 authored by Mayank Agarwal on 18 October 2013, 21:50:54 UTC
Dbid feature
Dbid feature
Tip revision: 9b50106
File | Mode | Size |
---|---|---|
build_tools | ||
coverage | ||
db | ||
doc | ||
hdfs | ||
helpers | ||
include | ||
linters | ||
port | ||
snappy | ||
table | ||
tools | ||
util | ||
utilities | ||
.arcconfig | -rw-r--r-- | 243 bytes |
.gitignore | -rw-r--r-- | 278 bytes |
LICENSE | -rw-r--r-- | 1.6 KB |
Makefile | -rw-r--r-- | 14.7 KB |
PATENTS | -rw-r--r-- | 1.4 KB |
README | -rw-r--r-- | 2.8 KB |
README.fb | -rw-r--r-- | 96 bytes |
Computing file changes ...