leveldb/util
costan 8415f00eee leveldb: Report missing CURRENT manifest file as database corruption.
BTRFS reorders rename and write operations, so it is possible that a filesystem crash and recovery results in a situation where the file pointed to by CURRENT does not exist. DB::Open currently reports an I/O error in this case. Reporting database corruption is a better hint to the caller, which can attempt to recover the database or erase it and start over.

This issue is not merely theoretical. It was reported as having showed up in the wild at https://github.com/google/leveldb/issues/195 and at https://crbug.com/738961. Also, asides from the BTRFS case described above, incorrect data in CURRENT seems like a possible corruption case that should be handled gracefully.

The Env API changes here can be considered backwards compatible, because an implementation that returns Status::IOError instead of Status::NotFound will still get the same functionality as before.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161432630
2017-07-10 14:14:00 -07:00
..
arena_test.cc Release LevelDB 1.15 2013-12-10 10:36:31 -08:00
arena.cc Resolve race when getting approximate-memory-usage property 2015-12-09 11:27:50 -08:00
arena.h Resolve race when getting approximate-memory-usage property 2015-12-09 11:27:50 -08:00
bloom_test.cc Fix size_t/int comparison/conversion issues in leveldb. 2015-12-09 10:34:58 -08:00
bloom.cc Fix size_t/int comparison/conversion issues in leveldb. 2015-12-09 10:34:58 -08:00
cache_test.cc fix problems in LevelDB's caching code 2016-07-06 09:15:53 -07:00
cache.cc fix problems in LevelDB's caching code 2016-07-06 09:15:53 -07:00
coding_test.cc Release LevelDB 1.15 2013-12-10 10:36:31 -08:00
coding.cc Update to leveldb 1.6 2012-10-12 11:53:12 -07:00
coding.h A number of fixes: 2011-10-31 17:22:06 +00:00
comparator.cc Remove static initializer; fix endian-ness detection; fix build on 2012-05-30 09:45:46 -07:00
crc32c_test.cc A number of fixes: 2011-10-31 17:22:06 +00:00
crc32c.cc Implement support for Intel crc32 instruction (SSE 4.2) 2017-02-28 14:08:46 -08:00
crc32c.h A number of fixes: 2011-10-31 17:22:06 +00:00
env_posix_test_helper.h Limit the number of read-only files the POSIX Env will have open. 2017-01-04 09:13:20 -08:00
env_posix_test.cc Separate Env tests from PosixEnv tests. 2017-03-01 13:53:23 -08:00
env_posix.cc leveldb: Report missing CURRENT manifest file as database corruption. 2017-07-10 14:14:00 -07:00
env_test.cc leveldb: Report missing CURRENT manifest file as database corruption. 2017-07-10 14:14:00 -07:00
env.cc LevelDB now attempts to reuse the preceding MANIFEST and log file when re-opened. 2015-08-11 14:56:39 -07:00
filter_policy.cc Added bloom filter support. 2012-04-17 08:36:46 -07:00
hash_test.cc Release 1.18 2014-09-16 14:19:52 -07:00
hash.cc Release 1.18 2014-09-16 14:19:52 -07:00
hash.h reverting disastrous MOE commit, returning to r21 2011-04-19 23:11:15 +00:00
histogram.cc A number of fixes: 2011-10-31 17:22:06 +00:00
histogram.h A number of fixes: 2011-10-31 17:22:06 +00:00
logging.cc Release 1.18 2014-09-16 14:19:52 -07:00
logging.h Release 1.18 2014-09-16 14:19:52 -07:00
mutexlock.h Update to leveldb 1.6 2012-10-12 11:53:12 -07:00
options.cc Add option for max file size. The currend hard-coded value of 2M is inefficient in colossus. 2016-09-28 10:52:24 -07:00
posix_logger.h A number of fixes: 2011-10-31 17:22:06 +00:00
random.h LevelDB 1.13 2013-08-21 11:12:47 -07:00
status.cc A number of fixes: 2011-10-31 17:22:06 +00:00
testharness.cc Release LevelDB 1.15 2013-12-10 10:36:31 -08:00
testharness.h A number of fixes: 2011-10-31 17:22:06 +00:00
testutil.cc Release LevelDB 1.15 2013-12-10 10:36:31 -08:00
testutil.h LevelDB now attempts to reuse the preceding MANIFEST and log file when re-opened. 2015-08-11 14:56:39 -07:00