diff --git a/db/version_set.cc b/db/version_set.cc index e9182f036..a1166b199 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -1263,7 +1263,7 @@ class LevelIterator final : public InternalIterator { // into the new file. Old range tombstone iterator is cleared. InternalIterator* NewFileIterator() { assert(file_index_ < flevel_->num_files); - auto file_meta = flevel_->files[file_index_]; + const auto& file_meta = flevel_->files[file_index_]; if (should_sample_) { sample_file_read_inc(file_meta.file_metadata); }