aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/db/filename.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/leveldb/db/filename.cc')
-rw-r--r--src/leveldb/db/filename.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/leveldb/db/filename.cc b/src/leveldb/db/filename.cc
index 3c4d49f64e..da32946d99 100644
--- a/src/leveldb/db/filename.cc
+++ b/src/leveldb/db/filename.cc
@@ -31,6 +31,11 @@ std::string LogFileName(const std::string& name, uint64_t number) {
std::string TableFileName(const std::string& name, uint64_t number) {
assert(number > 0);
+ return MakeFileName(name, number, "ldb");
+}
+
+std::string SSTTableFileName(const std::string& name, uint64_t number) {
+ assert(number > 0);
return MakeFileName(name, number, "sst");
}
@@ -71,7 +76,7 @@ std::string OldInfoLogFileName(const std::string& dbname) {
// dbname/LOG
// dbname/LOG.old
// dbname/MANIFEST-[0-9]+
-// dbname/[0-9]+.(log|sst)
+// dbname/[0-9]+.(log|sst|ldb)
bool ParseFileName(const std::string& fname,
uint64_t* number,
FileType* type) {
@@ -106,7 +111,7 @@ bool ParseFileName(const std::string& fname,
Slice suffix = rest;
if (suffix == Slice(".log")) {
*type = kLogFile;
- } else if (suffix == Slice(".sst")) {
+ } else if (suffix == Slice(".sst") || suffix == Slice(".ldb")) {
*type = kTableFile;
} else if (suffix == Slice(".dbtmp")) {
*type = kTempFile;