-
Notifications
You must be signed in to change notification settings - Fork 897
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
base: master
Are you sure you want to change the base?
[WIP] logbuffer metadata extra fields #1700
Conversation
/** | ||
* Offset within the log metadata where the term offset is stored. | ||
*/ | ||
public static final int LOG_TERM_OFFSET_OFFSET; |
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.
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);
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.
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; |
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.
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.
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.
Done
@pveentjer Please define new fields in the same order and using the same names as defined in the |
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.