From e653af716497f1284fedc7d0afecb118b4e812e3 Mon Sep 17 00:00:00 2001 From: rockeet Date: Mon, 24 Aug 2020 16:22:50 -0700 Subject: [PATCH] DBWithTTL::Open() param ttls: vector to const vector& (#7196) Summary: fix DBWithTTL::Open() param ttls: vector to const vector Pull Request resolved: https://github.com/facebook/rocksdb/pull/7196 Reviewed By: akankshamahajan15 Differential Revision: D23277772 Pulled By: ajkr fbshipit-source-id: bf69834b5c2062c7e166dab21fbfd40416c7872d --- include/rocksdb/utilities/db_ttl.h | 2 +- utilities/ttl/db_ttl_impl.cc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/rocksdb/utilities/db_ttl.h b/include/rocksdb/utilities/db_ttl.h index dd83cb24b..d57e7473a 100644 --- a/include/rocksdb/utilities/db_ttl.h +++ b/include/rocksdb/utilities/db_ttl.h @@ -57,7 +57,7 @@ class DBWithTTL : public StackableDB { static Status Open(const DBOptions& db_options, const std::string& dbname, const std::vector& column_families, std::vector* handles, - DBWithTTL** dbptr, std::vector ttls, + DBWithTTL** dbptr, const std::vector& ttls, bool read_only = false); virtual void SetTtl(int32_t ttl) = 0; diff --git a/utilities/ttl/db_ttl_impl.cc b/utilities/ttl/db_ttl_impl.cc index 9ebaa247f..ac3a3d17d 100644 --- a/utilities/ttl/db_ttl_impl.cc +++ b/utilities/ttl/db_ttl_impl.cc @@ -91,8 +91,7 @@ Status DBWithTTL::Open( const DBOptions& db_options, const std::string& dbname, const std::vector& column_families, std::vector* handles, DBWithTTL** dbptr, - std::vector ttls, bool read_only) { - + const std::vector& ttls, bool read_only) { if (ttls.size() != column_families.size()) { return Status::InvalidArgument( "ttls size has to be the same as number of column families");