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
This commit is contained in:
rockeet 2020-08-24 16:22:50 -07:00 committed by Facebook GitHub Bot
parent 5aacef9712
commit e653af7164
2 changed files with 2 additions and 3 deletions

View File

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

View File

@ -91,8 +91,7 @@ Status DBWithTTL::Open(
const DBOptions& db_options, const std::string& dbname,
const std::vector<ColumnFamilyDescriptor>& column_families,
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()) {
return Status::InvalidArgument(
"ttls size has to be the same as number of column families");