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

[WIP] logbuffer metadata extra fields #1700

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

pveentjer
Copy link
Contributor

@pveentjer pveentjer commented Dec 20, 2024

Adding extra fields to the metadata section of the logbuffers for Aeron Insights.

This PR is a replacement for the following one:

#1697

Which isn't going to be merged because it will break backwards compatibility.

@pveentjer pveentjer requested a review from vyazelenko December 20, 2024 05:26
@pveentjer pveentjer changed the title [WIP]] logbuffer metadata enhancements [WIP] logbuffer metadata extra fields Dec 20, 2024
/**
* Offset within the log metadata where the term offset is stored.
*/
public static final int LOG_TERM_OFFSET_OFFSET;
Copy link
Contributor

Choose a reason for hiding this comment

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

A natural place to store this information would the default frame header, i.e.:

        defaultDataHeader.sessionId(sessionId).streamId(streamId).termId(initialTermId).termOffset(termOffset);
        storeDefaultFrameHeader(logMetaData, defaultDataHeader);

Copy link
Contributor Author

@pveentjer pveentjer Dec 30, 2024

Choose a reason for hiding this comment

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

Ok. I'll set the term offset on the default frame header and will drop it from the LogBufferDescriptor

throw new Error("Bad alignment: offset=" + offset);
}

LOG_SOCKET_RCVBUF_LENGTH_OFFSET = offset;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's try to use available space after the page_size field (LOG_PAGE_SIZE_OFFSET + SIZE_OF_INT) where we still have 36 bytes before the default header starts.
That should be enough to fit 6 ints or 5 ints + 6 booleans.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@vyazelenko
Copy link
Contributor

vyazelenko commented Dec 20, 2024

@pveentjer Please define new fields in the same order and using the same names as defined in the aeron_logbuffer_metadata_t (see 306dfe8).

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