diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-18 15:19:52 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-18 15:19:54 +0100 |
commit | fb766b640cdab9edfdba70cdda5ad990d0733326 (patch) | |
tree | 5a78b0e2ba8fe62d12e933c9199c18c6ab9faa7e | |
parent | 6c19ca1f92c014a9a7155e159fda592733fb1d4c (diff) | |
parent | b9d384a45dfe9f258a81aee7341b32dcd712a494 (diff) |
Merge pull request #3555
060fdb4 Squashed 'src/leveldb/' changes from e991315..9094c7f (Pieter Wuille)
-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 da32946d99..27d750697b 100644 --- a/src/leveldb/db/filename.cc +++ b/src/leveldb/db/filename.cc @@ -29,14 +29,19 @@ std::string LogFileName(const std::string& name, uint64_t number) { return MakeFileName(name, number, "log"); } +// TableFileName returns the filenames we usually write to, while +// SSTTableFileName returns the alternative filenames we also try to read from +// for backward compatibility. For now, swap them around. +// TODO: when compatibility is no longer necessary, swap them back +// (TableFileName to use "ldb" and SSTTableFileName to use "sst"). std::string TableFileName(const std::string& name, uint64_t number) { assert(number > 0); - return MakeFileName(name, number, "ldb"); + return MakeFileName(name, number, "sst"); } std::string SSTTableFileName(const std::string& name, uint64_t number) { assert(number > 0); - return MakeFileName(name, number, "sst"); + return MakeFileName(name, number, "ldb"); } std::string DescriptorFileName(const std::string& dbname, uint64_t number) { |