diff --git a/db/db_iterator_test.cc b/db/db_iterator_test.cc index bb771554f..bc40a1790 100644 --- a/db/db_iterator_test.cc +++ b/db/db_iterator_test.cc @@ -1566,7 +1566,7 @@ TEST_F(DBIteratorTest, ReadAhead) { auto* iter = db_->NewIterator(read_options); iter->SeekToFirst(); int64_t num_file_opens = TestGetTickerCount(options, NO_FILE_OPENS); - int64_t bytes_read = env_->random_read_bytes_counter_; + size_t bytes_read = env_->random_read_bytes_counter_; delete iter; env_->random_read_bytes_counter_ = 0; @@ -1575,7 +1575,7 @@ TEST_F(DBIteratorTest, ReadAhead) { iter = db_->NewIterator(read_options); iter->SeekToFirst(); int64_t num_file_opens_readahead = TestGetTickerCount(options, NO_FILE_OPENS); - int64_t bytes_read_readahead = env_->random_read_bytes_counter_; + size_t bytes_read_readahead = env_->random_read_bytes_counter_; delete iter; ASSERT_EQ(num_file_opens + 3, num_file_opens_readahead); ASSERT_GT(bytes_read_readahead, bytes_read); diff --git a/db/db_test_util.h b/db/db_test_util.h index 4f2cea29c..8aba1e5d7 100644 --- a/db/db_test_util.h +++ b/db/db_test_util.h @@ -359,7 +359,7 @@ class SpecialEnv : public EnvWrapper { public: CountingFile(unique_ptr&& target, anon::AtomicCounter* counter, - std::atomic* bytes_read) + std::atomic* bytes_read) : target_(std::move(target)), counter_(counter), bytes_read_(bytes_read) {} @@ -374,7 +374,7 @@ class SpecialEnv : public EnvWrapper { private: unique_ptr target_; anon::AtomicCounter* counter_; - std::atomic* bytes_read_; + std::atomic* bytes_read_; }; Status s = target()->NewRandomAccessFile(f, r, soptions); @@ -471,7 +471,7 @@ class SpecialEnv : public EnvWrapper { bool count_random_reads_; anon::AtomicCounter random_read_counter_; - std::atomic random_read_bytes_counter_; + std::atomic random_read_bytes_counter_; std::atomic random_file_open_counter_; bool count_sequential_reads_;