leveldb/db
Sanjay Ghemawat 13e3c4efc6 Fix compactions that could end up breaking a run of the same user
key across multiple files.

As reported in Github issue #339, it is incorrect to split the
same user key across multiple compacted files since it causes
tombstones/newer-versions to be dropped, thereby exposing obsolete
data. There was a fix for #339, but it ended up not fully fixing
the problem. (It checked for boundary problems in the first level
being compacted, but not the second). This problem was revealed
by Github issue 887.

We now adjust boundaries to avoid splitting user keys in both the
first level and the second level.

PiperOrigin-RevId: 374921082
2021-05-20 19:13:04 +00:00
..
autocompact_test.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
builder.cc Merge pull request #819 from wzk784533:master 2020-07-13 19:14:04 +00:00
builder.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
c_test.c unsigned char -> uint8_t 2019-05-28 15:44:32 -07:00
c.cc IWYU fixes in db/c.cc. 2021-01-25 17:18:22 +00:00
corruption_test.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
db_impl.cc Sync MANIFEST before closing in db_impl when creating a new DB. 2021-01-12 21:58:08 +00:00
db_impl.h Add Env::Remove{File,Dir} which obsolete Env::Delete{File,Dir}. 2020-01-09 09:18:14 -08:00
db_iter.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
db_iter.h Switch from C headers to C++ headers. 2020-04-29 20:51:13 +00:00
db_test.cc Use partial path to benchmark/benchmark.h. 2021-02-16 16:51:09 -08:00
dbformat_test.cc Internal change. 2019-12-02 11:44:39 -08:00
dbformat.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
dbformat.h unsigned char -> uint8_t 2019-05-28 15:44:32 -07:00
dumpfile.cc Switch from C headers to C++ headers. 2020-04-29 20:51:13 +00:00
fault_injection_test.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
filename_test.cc Internal change. 2019-12-02 11:44:39 -08:00
filename.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
filename.h Switch from C headers to C++ headers. 2020-04-29 20:51:13 +00:00
leveldbutil.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
log_format.h Convert documentation to markdown. 2017-03-01 09:42:25 -08:00
log_reader.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
log_reader.h Switch from C headers to C++ headers. 2020-04-29 20:51:13 +00:00
log_test.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
log_writer.cc Switch from C headers to C++ headers. 2020-04-29 20:51:13 +00:00
log_writer.h Switch from C headers to C++ headers. 2020-04-29 20:51:13 +00:00
memtable.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
memtable.h Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
recovery_test.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
repair.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
skiplist_test.cc Add some std:: qualifiers to types and functions. 2020-04-29 22:33:14 +00:00
skiplist.h Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
snapshot.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
table_cache.cc Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
table_cache.h Switch from C headers to C++ headers. 2020-04-29 20:51:13 +00:00
version_edit_test.cc Add Env::Remove{File,Dir} which obsolete Env::Delete{File,Dir}. 2020-01-09 09:18:14 -08:00
version_edit.cc Add Env::Remove{File,Dir} which obsolete Env::Delete{File,Dir}. 2020-01-09 09:18:14 -08:00
version_edit.h Add Env::Remove{File,Dir} which obsolete Env::Delete{File,Dir}. 2020-01-09 09:18:14 -08:00
version_set_test.cc Internal change. 2019-12-02 11:44:39 -08:00
version_set.cc Fix compactions that could end up breaking a run of the same user 2021-05-20 19:13:04 +00:00
version_set.h Correct class/structure declaration order. 2019-05-03 09:48:57 -07:00
write_batch_internal.h Format all files IAW the Google C++ Style Guide. 2019-05-02 19:04:50 -07:00
write_batch_test.cc Internal change. 2019-12-02 11:44:39 -08:00
write_batch.cc Style cleanup. 2019-05-04 17:42:20 -07:00