DBWithTTL::Open() param ttls: vector<int32_t> to const vector<int32_t>& (#7196)

Summary:
fix DBWithTTL::Open() param ttls: vector<int32_t> to const vector<int32_t>

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7196

Reviewed By: akankshamahajan15

Differential Revision: D23277772

Pulled By: ajkr

fbshipit-source-id: bf69834b5c2062c7e166dab21fbfd40416c7872d
main
rockeet 4 years ago committed by Facebook GitHub Bot
parent 5aacef9712
commit e653af7164
  1. 2
      include/rocksdb/utilities/db_ttl.h
  2. 3
      utilities/ttl/db_ttl_impl.cc

@ -57,7 +57,7 @@ class DBWithTTL : public StackableDB {
static Status Open(const DBOptions& db_options, const std::string& dbname, static Status Open(const DBOptions& db_options, const std::string& dbname,
const std::vector<ColumnFamilyDescriptor>& column_families, const std::vector<ColumnFamilyDescriptor>& column_families,
std::vector<ColumnFamilyHandle*>* handles, std::vector<ColumnFamilyHandle*>* handles,
DBWithTTL** dbptr, std::vector<int32_t> ttls, DBWithTTL** dbptr, const std::vector<int32_t>& ttls,
bool read_only = false); bool read_only = false);
virtual void SetTtl(int32_t ttl) = 0; virtual void SetTtl(int32_t ttl) = 0;

@ -91,8 +91,7 @@ Status DBWithTTL::Open(
const DBOptions& db_options, const std::string& dbname, const DBOptions& db_options, const std::string& dbname,
const std::vector<ColumnFamilyDescriptor>& column_families, const std::vector<ColumnFamilyDescriptor>& column_families,
std::vector<ColumnFamilyHandle*>* handles, DBWithTTL** dbptr, std::vector<ColumnFamilyHandle*>* handles, DBWithTTL** dbptr,
std::vector<int32_t> ttls, bool read_only) { const std::vector<int32_t>& ttls, bool read_only) {
if (ttls.size() != column_families.size()) { if (ttls.size() != column_families.size()) {
return Status::InvalidArgument( return Status::InvalidArgument(
"ttls size has to be the same as number of column families"); "ttls size has to be the same as number of column families");

Loading…
Cancel
Save