diff --git a/db/merge_test.cc b/db/merge_test.cc index 8858977ea..9bdf54332 100644 --- a/db/merge_test.cc +++ b/db/merge_test.cc @@ -17,7 +17,7 @@ #include "db/write_batch_internal.h" #include "utilities/merge_operators.h" #include "util/testharness.h" -#include "utilities/utility_db.h" +#include "utilities/db_ttl.h" using namespace std; using namespace rocksdb; @@ -80,7 +80,6 @@ std::shared_ptr OpenDb(const string& dbname, const bool ttl = false, const size_t max_successive_merges = 0, const uint32_t min_partial_merge_operands = 2) { DB* db; - StackableDB* sdb; Options options; options.create_if_missing = true; options.merge_operator = std::make_shared(); @@ -90,8 +89,9 @@ std::shared_ptr OpenDb(const string& dbname, const bool ttl = false, DestroyDB(dbname, Options()); if (ttl) { cout << "Opening database with TTL\n"; - s = UtilityDB::OpenTtlDB(options, dbname, &sdb); - db = sdb; + DBWithTTL* db_with_ttl; + s = DBWithTTL::Open(options, dbname, &db_with_ttl); + db = db_with_ttl; } else { s = DB::Open(options, dbname, &db); } diff --git a/tools/db_stress.cc b/tools/db_stress.cc index 8b8523f89..c774171d8 100644 --- a/tools/db_stress.cc +++ b/tools/db_stress.cc @@ -28,7 +28,7 @@ #include "db/version_set.h" #include "rocksdb/statistics.h" #include "rocksdb/cache.h" -#include "utilities/utility_db.h" +#include "utilities/db_ttl.h" #include "rocksdb/env.h" #include "rocksdb/write_batch.h" #include "rocksdb/slice.h" @@ -42,7 +42,6 @@ #include "util/random.h" #include "util/testutil.h" #include "util/logging.h" -#include "utilities/ttl/db_ttl.h" #include "hdfs/env_hdfs.h" #include "utilities/merge_operators.h" @@ -1620,9 +1619,9 @@ class StressTest { assert(!s.ok() || column_families_.size() == static_cast(FLAGS_column_families)); } else { - StackableDB* sdb; - s = UtilityDB::OpenTtlDB(options_, FLAGS_db, &sdb, FLAGS_ttl); - db_ = sdb; + DBWithTTL* db_with_ttl; + s = DBWithTTL::Open(options_, FLAGS_db, &db_with_ttl, FLAGS_ttl); + db_ = db_with_ttl; } if (!s.ok()) { fprintf(stderr, "open error: %s\n", s.ToString().c_str()); diff --git a/utilities/merge_operators/string_append/stringappend_test.cc b/utilities/merge_operators/string_append/stringappend_test.cc index b0b5c5b59..a68186a3a 100644 --- a/utilities/merge_operators/string_append/stringappend_test.cc +++ b/utilities/merge_operators/string_append/stringappend_test.cc @@ -14,7 +14,7 @@ #include "utilities/merge_operators.h" #include "utilities/merge_operators/string_append/stringappend.h" #include "utilities/merge_operators/string_append/stringappend2.h" -#include "utilities/ttl/db_ttl.h" +#include "utilities/db_ttl.h" #include "util/testharness.h" #include "util/random.h" @@ -38,11 +38,11 @@ std::shared_ptr OpenNormalDb(char delim_char) { // Open a TtlDB with a non-associative StringAppendTESTOperator std::shared_ptr OpenTtlDb(char delim_char) { - StackableDB* db; + DBWithTTL* db; Options options; options.create_if_missing = true; options.merge_operator.reset(new StringAppendTESTOperator(delim_char)); - ASSERT_OK(UtilityDB::OpenTtlDB(options, kDbName, &db, 123456)); + ASSERT_OK(DBWithTTL::Open(options, kDbName, &db, 123456)); return std::shared_ptr(db); } } // namespace