Skip to content

Model specific cache detect schema change update#767

Merged
jfallows merged 3 commits into
aklivity:feature/schema-registryfrom
ankitk-me:modelCacheTTL
Jan 31, 2024
Merged

Model specific cache detect schema change update#767
jfallows merged 3 commits into
aklivity:feature/schema-registryfrom
ankitk-me:modelCacheTTL

Conversation

@ankitk-me

Copy link
Copy Markdown
Contributor

No description provided.

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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