Skip to content

Commit

Permalink
cloud_storage: Log client in remote segment
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijat committed Nov 8, 2023
1 parent f656c6c commit f4d00c5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/v/cloud_storage/remote_segment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1321,11 +1321,12 @@ remote_segment_batch_reader::read_some(
const auto msg = fmt::format(
"segment_reader is stuck, segment ntp: {}, _cur_rp_offset: "
"{}, "
"_bytes_consumed: {}, parser error state: {}",
"_bytes_consumed: {}, parser error state: {}, client: {}",
_seg->get_ntp(),
_cur_rp_offset,
_bytes_consumed,
_parser->error());
_parser->error(),
_config.client_address);
if (_parser->error() == storage::parser_errc::end_of_stream) {
vlog(_ctxlog.info, "{}", msg);
} else {
Expand All @@ -1345,15 +1346,24 @@ remote_segment_batch_reader::init_parser() {
ss::gate::holder h(_gate);
vlog(
_ctxlog.debug,
"remote_segment_batch_reader::init_parser, start_offset: {}",
_config.start_offset);
"remote_segment_batch_reader::init_parser (creating stream), "
"start_offset: {}, client: {}",
_config.start_offset,
_config.client_address);

auto stream_off = co_await _seg->offset_data_stream(
model::offset_cast(_config.start_offset),
model::offset_cast(_config.max_offset),
_config.first_timestamp,
priority_manager::local().shadow_indexing_priority());

vlog(
_ctxlog.debug,
"remote_segment_batch_reader::init_parser (stream created), "
"start_offset: {}, client: {}",
_config.start_offset,
_config.client_address);

auto parser = std::make_unique<storage::continuous_batch_parser>(
std::make_unique<remote_segment_batch_consumer>(
_config, *this, _seg->get_term(), _seg->get_ntp(), _rtc),
Expand Down

0 comments on commit f4d00c5

Please sign in to comment.