From 060fdb41fc58e962a694021f2883f765e3246748 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 18 Jan 2014 14:32:29 +0100 Subject: [PATCH] Squashed 'src/leveldb/' changes from e991315..9094c7f 9094c7f Temporarily revert to writing .sst files instead of .ldb git-subtree-dir: src/leveldb git-subtree-split: 9094c7ffe45e0bedd84ea414828f768fd49bcdf7 --- db/filename.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/db/filename.cc b/db/filename.cc index da32946d9..27d750697 100644 --- a/db/filename.cc +++ b/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) {