Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schema_registry/protobuf: Early exit recursion if file exists #8789

Merged

Conversation

BenPope
Copy link
Member

@BenPope BenPope commented Feb 10, 2023

During a depth-first search for references, it's possible for a reference to be looked up and added to the DescriptorPool multiple times, which fails.

If the DescriptorPool contains the reference already, early exit without a looking up the referenced schema, and adding it to the dp.

Signed-off-by: Ben Pope ben@redpanda.com

Backports Required

  • none - not a bug fix
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v22.3.x
  • v22.2.x
  • v22.1.x

UX Changes

  • none

Release Notes

Bug Fixes

  • Schema Registry: Improve protobuf support for recursive imports

During a depth-first search for references, it's possible for a
reference to be looked up and added to the `DescriptorPool`
multiple times, which fails.

If the `DescriptorPool` contains the reference already, early exit
without a looking up the referenced schema, and adding it to the dp.

Signed-off-by: Ben Pope <ben@redpanda.com>
@BenPope BenPope marked this pull request as ready for review February 10, 2023 17:48
Copy link
Contributor

@NyaliaLui NyaliaLui left a comment

Choose a reason for hiding this comment

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

lgtm

@BenPope
Copy link
Member Author

BenPope commented Feb 13, 2023

Known CI Failure: #8595

@BenPope BenPope merged commit 1870fec into redpanda-data:dev Feb 13, 2023
@BenPope
Copy link
Member Author

BenPope commented Feb 13, 2023

/backport v22.3.x

@BenPope
Copy link
Member Author

BenPope commented Feb 13, 2023

/backport v22.2.x

@BenPope
Copy link
Member Author

BenPope commented Feb 13, 2023

/backport v22.1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants