Skip to content

Commit

Permalink
schema_registry: has_version no longer ignores inc_del
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Pope <ben@redpanda.com>
  • Loading branch information
BenPope committed Jun 24, 2024
1 parent d97925d commit 4261670
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/v/pandaproxy/schema_registry/store.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ class store {
const subject& sub, schema_id id, include_deleted inc_del) const {
auto sub_it = BOOST_OUTCOME_TRYX(get_subject_iter(sub, inc_del));
const auto& vs = sub_it->second.versions;
return std::any_of(vs.cbegin(), vs.cend(), [id](const auto& entry) {
return entry.id == id;
return absl::c_any_of(vs, [id, inc_del](const auto& entry) {
return entry.id == id && (inc_del || !entry.deleted);
});
}

Expand Down

0 comments on commit 4261670

Please sign in to comment.