migration_manager: Log schema pulls

This commit is contained in:
Tomasz Grabiec
2017-07-26 12:20:35 +02:00
parent 350d98d4e1
commit e09220dbff

View File

@@ -207,15 +207,19 @@ future<> migration_manager::submit_migration_task(const gms::inet_address& endpo
future<> migration_manager::do_merge_schema_from(netw::messaging_service::msg_addr id)
{
auto& ms = netw::get_local_messaging_service();
mlogger.info("Pulling schema from {}", id);
return ms.send_migration_request(std::move(id)).then([this, id] (std::vector<frozen_mutation> mutations) {
return do_with(std::move(mutations), [this, id] (auto&& mutations) {
return this->merge_schema_from(id, mutations);
});
}).then([id] {
mlogger.info("Schema merge with {} completed", id);
});
}
future<> migration_manager::merge_schema_from(netw::messaging_service::msg_addr id)
{
mlogger.info("Requesting schema pull from {}", id);
auto i = _schema_pulls.find(id);
if (i == _schema_pulls.end()) {
// FIXME: Drop entries for removed nodes (or earlier).