Force read existing data during db repair (#5209)

Summary:
Setting read_opts.total_order_seek achieves this, even with a different prefix
extractor.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5209

Differential Revision: D14980388

Pulled By: riversand963

fbshipit-source-id: 16527989a3d6b3e3ae8241c894d011326429d66e
This commit is contained in:
Yanqin Jin 2019-04-19 11:52:13 -07:00 committed by Facebook Github Bot
parent 5265c5709e
commit c77aab584e

View File

@ -517,8 +517,10 @@ class Repairer {
} }
} }
if (status.ok()) { if (status.ok()) {
ReadOptions ropts;
ropts.total_order_seek = true;
InternalIterator* iter = table_cache_->NewIterator( InternalIterator* iter = table_cache_->NewIterator(
ReadOptions(), env_options_, cfd->internal_comparator(), t->meta, ropts, env_options_, cfd->internal_comparator(), t->meta,
nullptr /* range_del_agg */, nullptr /* range_del_agg */,
cfd->GetLatestMutableCFOptions()->prefix_extractor.get()); cfd->GetLatestMutableCFOptions()->prefix_extractor.get());
bool empty = true; bool empty = true;