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

Optimize memory allocation for mqtt-kafka offset tracking #694

Merged
merged 3 commits into from
Jan 15, 2024

Conversation

bmaidics
Copy link
Contributor

@bmaidics bmaidics commented Jan 3, 2024

No description provided.

@bmaidics bmaidics added the bug Something isn't working label Jan 3, 2024
@bmaidics bmaidics self-assigned this Jan 3, 2024
@bmaidics bmaidics linked an issue Jan 3, 2024 that may be closed by this pull request
for (; offset < buffer.capacity(); offset += BitUtil.SIZE_OF_SHORT)
{
metadataList.add((int) buffer.getShort(offset));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs a version prefix in case we choose to evolve the structure over time.
Needs BIG_ENDIAN as we are putting into an external system so could be read by any endian environment, not just local native endianness.

Also, let's use int16[length] support in .idl to generate a flyweight instead.
See examples in flyweight test resources at https://github.com/aklivity/zilla/blob/develop/build/flyweight-maven-plugin/src/test/resources/test-project/test.idl#L123.

@jfallows jfallows merged commit 6191589 into aklivity:develop Jan 15, 2024
5 checks passed
bmaidics added a commit to bmaidics/zilla that referenced this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize memory allocation for mqtt-kafka offset tracking
2 participants