rocksdb/db/db_impl
Yanqin Jin 7d8d56413d Override check consistency for DBImplSecondary (#5469)
Summary:
`DBImplSecondary` calls `CheckConsistency()` during open. In the past, `DBImplSecondary` did not override this function thus `DBImpl::CheckConsistency()` is called.
The following can happen. The secondary instance is performing consistency check which calls `GetFileSize(file_path)` but the file at `file_path` is deleted by the primary instance. `DBImpl::CheckConsistency` does not account for this and fails the consistency check. This is undesirable. The solution is that, we call `DBImpl::CheckConsistency()` first. If it passes, then we are good. If not, we give it a second chance and handles the case of file(s) being deleted.

Test plan (on dev server):
```
$make clean && make -j20 all
$./db_secondary_test
```
All other existing unit tests must pass as well.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5469

Differential Revision: D15861845

Pulled By: riversand963

fbshipit-source-id: 507d72392508caed3cd003bb2e2aa43f993dd597
2019-06-17 15:39:55 -07:00
..
db_impl_compaction_flush.cc Potential fix for stress test failure due to "SST file ahead of WAL" error (#5412) 2019-06-07 15:35:47 -07:00
db_impl_debug.cc Persistent Stats: persist stats history to disk (#5046) 2019-06-17 15:21:50 -07:00
db_impl_experimental.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
db_impl_files.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
db_impl_open.cc Persistent Stats: persist stats history to disk (#5046) 2019-06-17 15:21:50 -07:00
db_impl_readonly.cc Make format 2019-05-31 15:24:43 -07:00
db_impl_readonly.h Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
db_impl_secondary.cc Override check consistency for DBImplSecondary (#5469) 2019-06-17 15:39:55 -07:00
db_impl_secondary.h Override check consistency for DBImplSecondary (#5469) 2019-06-17 15:39:55 -07:00
db_impl_write.cc WritePrepared: reduce prepared_mutex_ overhead (#5420) 2019-06-10 11:53:31 -07:00
db_impl.cc Override check consistency for DBImplSecondary (#5469) 2019-06-17 15:39:55 -07:00
db_impl.h Persistent Stats: persist stats history to disk (#5046) 2019-06-17 15:21:50 -07:00
db_secondary_test.cc Override check consistency for DBImplSecondary (#5469) 2019-06-17 15:39:55 -07:00