diff --git a/db/db_impl.cc b/db/db_impl.cc index 42df6ec6667bf184867aeb99c227a18e6995b7c1..fc423e901d7c6d6592c136c43da928ef50f4d8f4 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -4163,7 +4163,7 @@ Status DBImpl::GetPropertiesOfAllTables(ColumnFamilyHandle* column_family, } Status DBImpl::GetPropertiesOfTablesInRange(ColumnFamilyHandle* column_family, - const Range* range, int n, + const Range* range, std::size_t n, TablePropertiesCollection* props) { auto cfh = reinterpret_cast(column_family); auto cfd = cfh->cfd(); diff --git a/db/db_impl.h b/db/db_impl.h index 3d8754634e47d62aa35aa8b4f9cbedf147af023c..4a58f9318b83aec2c55d8b74315da8c1e7362d15 100644 --- a/db/db_impl.h +++ b/db/db_impl.h @@ -811,7 +811,7 @@ class DBImpl : public DB { TablePropertiesCollection* props) override; virtual Status GetPropertiesOfTablesInRange( - ColumnFamilyHandle* column_family, const Range* range, int n, + ColumnFamilyHandle* column_family, const Range* range, std::size_t n, TablePropertiesCollection* props) override; #endif // ROCKSDB_LITE diff --git a/db/db_test.cc b/db/db_test.cc index 83db98c55d1ed159086d3e366c8d97e933fb4c36..93f355185c02571a89952eef58c368fa44013936 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -5640,7 +5640,7 @@ class ModelDB: public DB { } virtual Status GetPropertiesOfTablesInRange( - ColumnFamilyHandle* column_family, const Range* range, int n, + ColumnFamilyHandle* column_family, const Range* range, std::size_t n, TablePropertiesCollection* props) override { return Status(); } diff --git a/db/version_set.cc b/db/version_set.cc index 5ddecbb5399d991756fe900986f1e5244ea5f5a3..e52ae13965fd6fa7623ec48c35f59819829d03de 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -625,9 +625,9 @@ Status Version::GetPropertiesOfAllTables(TablePropertiesCollection* props, } Status Version::GetPropertiesOfTablesInRange( - const Range* range, int n, TablePropertiesCollection* props) const { + const Range* range, std::size_t n, TablePropertiesCollection* props) const { for (int level = 0; level < storage_info_.num_non_empty_levels(); level++) { - for (int i = 0; i < n; i++) { + for (decltype(n) i = 0; i < n; i++) { // Convert user_key into a corresponding internal key. InternalKey k1(range[i].start, kMaxSequenceNumber, kValueTypeForSeek); InternalKey k2(range[i].limit, kMaxSequenceNumber, kValueTypeForSeek); diff --git a/db/version_set.h b/db/version_set.h index 1f43455751d021c2a677d31cf88b46346cd87114..c250dddbd2c5d3edae72bcaad8bbdf922b3b70ae 100644 --- a/db/version_set.h +++ b/db/version_set.h @@ -467,7 +467,7 @@ class Version { // tables' propertis, represented as shared_ptr. Status GetPropertiesOfAllTables(TablePropertiesCollection* props); Status GetPropertiesOfAllTables(TablePropertiesCollection* props, int level); - Status GetPropertiesOfTablesInRange(const Range* range, int n, + Status GetPropertiesOfTablesInRange(const Range* range, std::size_t n, TablePropertiesCollection* props) const; // REQUIRES: lock is held diff --git a/include/rocksdb/db.h b/include/rocksdb/db.h index c32957d26e1882b39658118647d548a43c706779..e760f409e2734440b4565c252a152b96dad23c66 100644 --- a/include/rocksdb/db.h +++ b/include/rocksdb/db.h @@ -717,7 +717,7 @@ class DB { return GetPropertiesOfAllTables(DefaultColumnFamily(), props); } virtual Status GetPropertiesOfTablesInRange( - ColumnFamilyHandle* column_family, const Range* range, int n, + ColumnFamilyHandle* column_family, const Range* range, std::size_t n, TablePropertiesCollection* props) = 0; #endif // ROCKSDB_LITE diff --git a/include/rocksdb/utilities/stackable_db.h b/include/rocksdb/utilities/stackable_db.h index ed67e0436b56c24c3e4a5d2d45a877b4216576ff..50b5538f7ca39db63aefb68109df5994d32c9d02 100644 --- a/include/rocksdb/utilities/stackable_db.h +++ b/include/rocksdb/utilities/stackable_db.h @@ -281,7 +281,7 @@ class StackableDB : public DB { using DB::GetPropertiesOfTablesInRange; virtual Status GetPropertiesOfTablesInRange( - ColumnFamilyHandle* column_family, const Range* range, int n, + ColumnFamilyHandle* column_family, const Range* range, std::size_t n, TablePropertiesCollection* props) override { return db_->GetPropertiesOfTablesInRange(column_family, range, n, props); }