Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/v/bytes/iobuf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ std::strong_ordering iobuf::operator<=>(const iobuf& o) const {
rhs.remove_prefix(n);
if (rhs.empty()) {
rhs = other_next_view();
if (o_it == o.cend()) {
if (rhs.empty()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll open up a separate PR to backport this fix to older RP versions.

break;
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/v/bytes/tests/iobuf_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ SEASTAR_THREAD_TEST_CASE(test_cmp_str_view) {
std::strong_ordering::equal, (multiple_frags.share(0, 3) <=> "cat"));
BOOST_CHECK_LT(iobuf::from(""), iobuf::from("cat"));
BOOST_CHECK_GT(iobuf::from("cat"), iobuf::from(""));
auto multi_frags = iobuf::from("ab");
multi_frags.append_fragments(iobuf::from("d"));
BOOST_CHECK_EQUAL(
true, (iobuf::from("abc") <=> multi_frags) == std::strong_ordering::less);
}

SEASTAR_THREAD_TEST_CASE(test_appended_data_is_retained) {
Expand Down