-
Notifications
You must be signed in to change notification settings - Fork 1.1k
MINOR: Add assertions to validate parsed schema cache keys #3881
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
base: master
Are you sure you want to change the base?
Conversation
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds assertion statements to validate that schema cache keys are properly formatted before being used in cache operations. The assertions ensure that schema objects used as cache keys have null version and ID fields, which is a requirement for proper cache key generation.
- Added assertions to validate schema parameters in
loadSchema
,invalidateFromNewSchemaCache
, andinvalidateFromOldSchemaCache
methods - Ensures schema cache keys are properly formatted with null version and ID fields
- Prevents potential cache corruption or incorrect behavior due to improperly formatted schema keys
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
core/src/main/java/io/confluent/kafka/schemaregistry/storage/KafkaSchemaRegistry.java
Outdated
Show resolved
Hide resolved
ada41c2
to
2fec09d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2fec09d
to
6780a34
Compare
What
Add assertions to validate parsed schema cache keys
Checklist
Please answer the questions with Y, N or N/A if not applicable.
References
JIRA:
Test & Review
Open questions / Follow-ups