mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
streaming: Drop update_progress in stream_coordinator
Since we have session_info inside stream_session now, we can call update_progress directly in stream_session.
This commit is contained in:
@@ -94,15 +94,6 @@ public:
|
||||
return session;
|
||||
}
|
||||
|
||||
void update_progress(progress_info info) {
|
||||
auto peer = info.peer;
|
||||
auto it = _peer_sessions.find(peer);
|
||||
if (it == _peer_sessions.end()) {
|
||||
throw std::runtime_error(sprint("Unknown peer requested: %s", peer));
|
||||
}
|
||||
it->second->update_progress(info);
|
||||
}
|
||||
|
||||
std::vector<session_info> get_all_session_info();
|
||||
std::vector<session_info> get_peer_session_info(inet_address peer);
|
||||
|
||||
|
||||
@@ -131,7 +131,6 @@ stream_state stream_result_future::get_current_state() {
|
||||
}
|
||||
|
||||
void stream_result_future::handle_progress(progress_info progress) {
|
||||
_coordinator->update_progress(progress);
|
||||
fire_stream_event(progress_event(plan_id, std::move(progress)));
|
||||
}
|
||||
|
||||
|
||||
@@ -388,7 +388,9 @@ void stream_session::progress(UUID cf_id, progress_info::direction dir, size_t f
|
||||
// FIXME: we can not estimate total number of bytes for a
|
||||
// stream_transfer_task or stream_receive_task, since we don't know the
|
||||
// size of the frozen_mutation until we read it.
|
||||
_stream_result->handle_progress(progress_info(peer, cf_id.to_sstring(), dir, bytes, bytes));
|
||||
progress_info progress(peer, cf_id.to_sstring(), dir, bytes, bytes);
|
||||
update_progress(progress);
|
||||
_stream_result->handle_progress(progress);
|
||||
}
|
||||
|
||||
void stream_session::received(UUID cf_id, int sequence_number) {
|
||||
|
||||
Reference in New Issue
Block a user