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

Model specific cache detect schema change update #767

Merged
merged 3 commits into from
Jan 31, 2024

Conversation

ankitk-me
Copy link
Contributor

No description provided.

private int generateCRC32C(
String schemaText)
{
byte[] bytes = schemaText.getBytes();
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is going to allocate a new byte[] on every call to validate.
Let's instead store the actual schemaText rather than a crc32c hash to compare.

private int generateCRC32C(
String schemaText)
{
byte[] bytes = schemaText.getBytes();
Copy link
Contributor

Choose a reason for hiding this comment

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

Same feedback here as for avro.

private int generateCRC32C(
String schemaText)
{
byte[] bytes = schemaText.getBytes();
Copy link
Contributor

Choose a reason for hiding this comment

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

Same feedback here as for avro.

@jfallows jfallows merged commit e44c899 into aklivity:feature/schema-registry Jan 31, 2024
3 checks passed
jfallows added a commit that referenced this pull request Feb 1, 2024
@ankitk-me ankitk-me deleted the modelCacheTTL branch February 1, 2024 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants