-
Notifications
You must be signed in to change notification settings - Fork 507
sstable: add code generator for sstable properties #5099
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
base: master
Are you sure you want to change the base?
Conversation
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.
Reviewable status: 0 of 20 files reviewed, 1 unresolved discussion (waiting on @jbowens)
sstable/properties.go
line 443 at r1 (raw file):
p.saveUvarint(m, unsafe.Offsetof(p.RawPointTombstoneValueSize), p.RawPointTombstoneValueSize) } if p.NumRangeKeys() > 0 {
This conditional block is the source of the test differences: we no longer include these fields when the value is zero.
This was mostly written by |
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.
Reviewable status: 0 of 20 files reviewed, 2 unresolved discussions (waiting on @jbowens and @RaduBerinde)
sstable/internal/genprops/gen_props.go
line 1 at r1 (raw file):
Previously, RaduBerinde wrote…
This was mostly written by
o3
(https://chatgpt.com/share/e/687f9a51-6c38-8010-8c57-7682aecfea17). Feels strange to add this copyright to it, I'm not sure what the convention should be.
Let's leave this copyright header in place. Ack on the strangeness, but no copyright or some other copyright notice feels even stranger.
|
The code to load/encode properties uses a mixture of relfection and unsafe code and is fairly hard to understand. This commit switches to using generated code instead. The generated code is straightforward to understand.
aa743c7
to
df16419
Compare
The code to load/encode properties uses a mixture of relfection and
unsafe code and is fairly hard to understand. This commit switches to
using generated code instead. The generated code is straightforward to
understand.
Fixes #5098.