-
Notifications
You must be signed in to change notification settings - Fork 900
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
Logbuffer metadata extra fields #1700
Merged
vyazelenko
merged 25 commits into
aeron-io:master
from
pveentjer:feature/logbuffer-metadata-enhancements
Jan 8, 2025
Merged
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
a378c8f
Initial checking extra properties logbuffer metadata
pveentjer 708407e
WIP
pveentjer a0b6493
Minor cleanup
pveentjer ce1040f
Further improvements
pveentjer 0c7a358
Minor fixes
pveentjer 2bd9830
Booleans are now encoded as byte instead of int
pveentjer 57ea62d
Removed the extra cacheline of padding after the frame header
pveentjer 6c4e28e
Fixed checkstyle issues
pveentjer e6039b3
Moved as many fields as possible before the frame header
pveentjer b5cf57c
Checkstyle fixes
pveentjer ee98864
Lot of minor improvements
pveentjer b092c5f
More work on descriptor
pveentjer 8ee1291
More work log buffer descriptor
pveentjer a94276a
hacks
pveentjer 84c9146
Disabled the fields after the end of the original record; now java_sy…
pveentjer 37e060e
Added the default_header to the struct
pveentjer 7a7fe9a
All working apart from the assert from aeron_logbuffer_metadata_t size
pveentjer e4625f3
Fixed padding problem
pveentjer 6066761
Update the order of the fields to reflect master
pveentjer e177c9c
Furher alignment
pveentjer 015496f
Merge fixes
pveentjer 13264fe
Fixes
pveentjer c7e8a57
Updated javadoc field layout
pveentjer 1fbfb2c
Processed review comments
pveentjer 7742a73
Removed padding from LogBufferDescriptor documentation
pveentjer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why add trailing padding? The entire metadata section is 4KB and is cache line aligned. We are going to read only the fields we need, i.e. consume up to 480 bytes.
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.
The original code also had padding at the end of the struct:
My guess is that it was done to prevent false sharing.
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.
I had another look. I think I understand what is happening.
The padding is needed to position the defaultHeader. It isn't needed to prevent false sharing.
Since the empty space (the pad3) is now filled with the extra fields, the padding isn't relevant any longer.
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.
Yes, so no extra padding is needed. The definition on the C side was correct after the 9eb689f commit.