mirror of
https://github.com/google/leveldb.git
synced 2024-12-02 21:19:03 +08:00
8415f00eee
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 |
||
---|---|---|
.. | ||
arena_test.cc | ||
arena.cc | ||
arena.h | ||
bloom_test.cc | ||
bloom.cc | ||
cache_test.cc | ||
cache.cc | ||
coding_test.cc | ||
coding.cc | ||
coding.h | ||
comparator.cc | ||
crc32c_test.cc | ||
crc32c.cc | ||
crc32c.h | ||
env_posix_test_helper.h | ||
env_posix_test.cc | ||
env_posix.cc | ||
env_test.cc | ||
env.cc | ||
filter_policy.cc | ||
hash_test.cc | ||
hash.cc | ||
hash.h | ||
histogram.cc | ||
histogram.h | ||
logging.cc | ||
logging.h | ||
mutexlock.h | ||
options.cc | ||
posix_logger.h | ||
random.h | ||
status.cc | ||
testharness.cc | ||
testharness.h | ||
testutil.cc | ||
testutil.h |