Skip to content

Commit

Permalink
Merge src/leveldb changes: temporarily revert to writing .sst files.
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Jan 18, 2014
2 parents 6c19ca1 + 060fdb4 commit b9d384a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/leveldb/db/filename.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b9d384a

Please sign in to comment.