diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2013-12-12 22:08:18 +0100 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2013-12-12 22:08:18 +0100 |
commit | ed873a301eeff8c021ba57c78fb702fd2b6f0452 (patch) | |
tree | 3fb5bcb91b8ceab464a50e63b6fce407eccb17e2 /src/leveldb/db/filename.cc | |
parent | fb34be6d5905d36a2d9a392d87aa73bdb9470a1b (diff) | |
parent | 55c68902946c8c9bacea748c159be456a7c9c180 (diff) |
Merge src/leveldb changes for LevelDB 1.15
Diffstat (limited to 'src/leveldb/db/filename.cc')
-rw-r--r-- | src/leveldb/db/filename.cc | 9 |
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; |