Skip to content

Commit 085f754

Browse files
committed
storage: add more log context to continuous_batch_parser::consume_records
This `ERROR` log line would be more helpful with added information about the batch consumer type and record batch header. Add a new `ERROR` log line to output these in the cold path.
1 parent 33dfcaf commit 085f754

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/v/storage/parser.cc

+8-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,14 @@ ss::future<result<stop_parser>> continuous_batch_parser::consume_records() {
207207
.then(
208208
[this](result<iobuf, parser_errc> record)
209209
-> ss::future<result<stop_parser>> {
210-
if (!record) {
210+
if (unlikely(!record)) {
211+
vlog(
212+
stlog.error,
213+
"parser::consume_records error: {} (record_batch_header: {}, "
214+
"batch consumer: {}) ",
215+
to_string(record.error()),
216+
*_header,
217+
*_consumer);
211218
return ss::make_ready_future<result<stop_parser>>(
212219
record.error());
213220
}

0 commit comments

Comments
 (0)