Skip to content

Commit b9d384a

Browse files
committed
Merge src/leveldb changes: temporarily revert to writing .sst files.
2 parents 6c19ca1 + 060fdb4 commit b9d384a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/leveldb/db/filename.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,19 @@ std::string LogFileName(const std::string& name, uint64_t number) {
2929
return MakeFileName(name, number, "log");
3030
}
3131

32+
// TableFileName returns the filenames we usually write to, while
33+
// SSTTableFileName returns the alternative filenames we also try to read from
34+
// for backward compatibility. For now, swap them around.
35+
// TODO: when compatibility is no longer necessary, swap them back
36+
// (TableFileName to use "ldb" and SSTTableFileName to use "sst").
3237
std::string TableFileName(const std::string& name, uint64_t number) {
3338
assert(number > 0);
34-
return MakeFileName(name, number, "ldb");
39+
return MakeFileName(name, number, "sst");
3540
}
3641

3742
std::string SSTTableFileName(const std::string& name, uint64_t number) {
3843
assert(number > 0);
39-
return MakeFileName(name, number, "sst");
44+
return MakeFileName(name, number, "ldb");
4045
}
4146

4247
std::string DescriptorFileName(const std::string& dbname, uint64_t number) {

0 commit comments

Comments
 (0)