From ddec2b4d092da59671c8edbc4cd5dc35efc9f5d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dziepak?= Date: Wed, 2 Sep 2015 13:30:23 +0200 Subject: [PATCH] batchlog_manager: pass mutations by const ref MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Dziepak --- db/batchlog_manager.cc | 6 +++--- db/batchlog_manager.hh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/db/batchlog_manager.cc b/db/batchlog_manager.cc index dc2520b638..6d7018b08a 100644 --- a/db/batchlog_manager.cc +++ b/db/batchlog_manager.cc @@ -75,11 +75,11 @@ future db::batchlog_manager::count_all_batches() const { }); } -mutation db::batchlog_manager::get_batch_log_mutation_for(std::vector mutations, const utils::UUID& id, int32_t version) { - return get_batch_log_mutation_for(std::move(mutations), id, version, db_clock::now()); +mutation db::batchlog_manager::get_batch_log_mutation_for(const std::vector& mutations, const utils::UUID& id, int32_t version) { + return get_batch_log_mutation_for(mutations, id, version, db_clock::now()); } -mutation db::batchlog_manager::get_batch_log_mutation_for(std::vector mutations, const utils::UUID& id, int32_t version, db_clock::time_point now) { +mutation db::batchlog_manager::get_batch_log_mutation_for(const std::vector& mutations, const utils::UUID& id, int32_t version, db_clock::time_point now) { auto schema = _qp.db().local().find_schema(system_keyspace::NAME, system_keyspace::BATCHLOG); auto key = partition_key::from_exploded(*schema, {uuid_type->decompose(id)}); auto timestamp = db_clock::now_in_usecs(); diff --git a/db/batchlog_manager.hh b/db/batchlog_manager.hh index 8c71c4ab50..1996b7a16a 100644 --- a/db/batchlog_manager.hh +++ b/db/batchlog_manager.hh @@ -71,8 +71,8 @@ public: size_t get_total_batches_replayed() const { return _total_batches_replayed; } - mutation get_batch_log_mutation_for(std::vector, const utils::UUID&, int32_t); - mutation get_batch_log_mutation_for(std::vector, const utils::UUID&, int32_t, db_clock::time_point); + mutation get_batch_log_mutation_for(const std::vector&, const utils::UUID&, int32_t); + mutation get_batch_log_mutation_for(const std::vector&, const utils::UUID&, int32_t, db_clock::time_point); db_clock::duration get_batch_log_timeout() const; std::unordered_set endpoint_filter(const sstring&, const std::unordered_map>&);