Skip to content

Commit

Permalink
const fix for the rest of the files under storage/rocksdb after rebase (
Browse files Browse the repository at this point in the history
percona#480) (percona#480)

Summary:
This is the last pull request for the const fix of all the files under storage/rocksdb.

The changes will improve the robustness of the code and make it easier for refactoring in the future.
Closes facebook/mysql-5.6#480

Differential Revision: D4349370

Pulled By: sidigit1205
  • Loading branch information
Sidi Fu authored and inikep committed Jan 28, 2022
1 parent 7a7c378 commit 2755a87
Show file tree
Hide file tree
Showing 18 changed files with 1,504 additions and 1,406 deletions.
5 changes: 3 additions & 2 deletions storage/rocksdb/event_listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extract_index_stats(
) {
std::vector<Rdb_index_stats> ret;
for (auto fn : files) {
auto it = props.find(fn);
const auto it = props.find(fn);
DBUG_ASSERT(it != props.end());
std::vector<Rdb_index_stats> stats;
Rdb_tbl_prop_coll::read_stats_from_tbl_props(it->second, &stats);
Expand All @@ -52,7 +52,8 @@ void Rdb_event_listener::update_index_stats(
const rocksdb::TableProperties& props
) {
DBUG_ASSERT(m_ddl_manager != nullptr);
auto tbl_props = std::make_shared<const rocksdb::TableProperties>(props);
const auto tbl_props =
std::make_shared<const rocksdb::TableProperties>(props);

std::vector<Rdb_index_stats> stats;
Rdb_tbl_prop_coll::read_stats_from_tbl_props(tbl_props, &stats);
Expand Down
4 changes: 2 additions & 2 deletions storage/rocksdb/event_listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ class Rdb_event_listener : public rocksdb::EventListener
Rdb_event_listener(const Rdb_event_listener&) = delete;
Rdb_event_listener& operator=(const Rdb_event_listener&) = delete;

explicit Rdb_event_listener(Rdb_ddl_manager* ddl_manager) :
explicit Rdb_event_listener(Rdb_ddl_manager* const ddl_manager) :
m_ddl_manager(ddl_manager) {
}

void OnCompactionCompleted(
rocksdb::DB *db, const rocksdb::CompactionJobInfo& ci) override;
rocksdb::DB* db, const rocksdb::CompactionJobInfo& ci) override;
void OnFlushCompleted(
rocksdb::DB* db, const rocksdb::FlushJobInfo& flush_job_info) override;
void OnExternalFileIngested(
Expand Down
Loading

0 comments on commit 2755a87

Please sign in to comment.