diff options
Diffstat (limited to 'db/repair.cc')
-rw-r--r-- | db/repair.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/db/repair.cc b/db/repair.cc index 022d52f..dc93fb8 100644 --- a/db/repair.cc +++ b/db/repair.cc @@ -263,6 +263,12 @@ class Repairer { std::string fname = TableFileName(dbname_, t->meta.number); int counter = 0; Status status = env_->GetFileSize(fname, &t->meta.file_size); + if (!status.ok()) { + fname = SSTTableFileName(dbname_, t->meta.number); + Status s2 = env_->GetFileSize(fname, &t->meta.file_size); + if (s2.ok()) + status = Status::OK(); + } if (status.ok()) { Iterator* iter = table_cache_->NewIterator( ReadOptions(), t->meta.number, t->meta.file_size); @@ -293,6 +299,8 @@ class Repairer { } delete iter; } + // If there was trouble opening an .sst file this will report that the .ldb + // file was not found, which is kind of lame but shouldn't happen often. Log(options_.info_log, "Table #%llu: %d entries %s", (unsigned long long) t->meta.number, counter, |