rocksdb/db/db_impl
Yanqin Jin fe1147db1c Let DBSecondary close files after catch up (#6114)
Summary:
After secondary instance replays the logs from primary, certain files become
obsolete. The secondary should find these files, evict their table readers from
table cache and close them. If this is not done, the secondary will hold on to
these files and prevent their space from being freed.

Test plan (devserver):
```
$./db_secondary_test --gtest_filter=DBSecondaryTest.SecondaryCloseFiles
$make check
$./db_stress -ops_per_thread=100000 -enable_secondary=true -threads=32 -secondary_catch_up_one_in=10000 -clear_column_family_one_in=1000 -reopen=100
```
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6114

Differential Revision: D18769998

Pulled By: riversand963

fbshipit-source-id: 5d1f151567247196164e1b79d8402fa2045b9120
2019-12-02 17:45:03 -08:00
..
db_impl_compaction_flush.cc Fix a potential bug scheduling unnecessary threads (#6104) 2019-11-27 14:48:49 -08:00
db_impl_debug.cc Fix IngestExternalFile's bug with two_write_queue (#5976) 2019-11-15 14:00:37 -08:00
db_impl_experimental.cc Support options.max_open_files = -1 with periodic_compaction_seconds (#6090) 2019-11-26 21:39:56 -08:00
db_impl_files.cc Let DBSecondary close files after catch up (#6114) 2019-12-02 17:45:03 -08:00
db_impl_open.cc Support options.max_open_files = -1 with periodic_compaction_seconds (#6090) 2019-11-26 21:39:56 -08:00
db_impl_readonly.cc Apply formatter on recent 45 commits. (#5827) 2019-09-19 12:34:17 -07:00
db_impl_readonly.h Use delete to disable automatic generated methods. (#5009) 2019-09-11 18:09:00 -07:00
db_impl_secondary.cc Let DBSecondary close files after catch up (#6114) 2019-12-02 17:45:03 -08:00
db_impl_secondary.h Let DBSecondary close files after catch up (#6114) 2019-12-02 17:45:03 -08:00
db_impl_write.cc Fix IngestExternalFile's bug with two_write_queue (#5976) 2019-11-15 14:00:37 -08:00
db_impl.cc Fix a data race between GetColumnFamilyMetaData and MarkFilesBeingCompacted (#6056) 2019-11-20 16:36:29 -08:00
db_impl.h Let DBSecondary close files after catch up (#6114) 2019-12-02 17:45:03 -08:00
db_secondary_test.cc Let DBSecondary close files after catch up (#6114) 2019-12-02 17:45:03 -08:00