-
Notifications
You must be signed in to change notification settings - Fork 175
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
Add trie level metadata to table blocks and trie catalog #4240
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.
Good PR, @FiV0, thanks 🙏
- next time, can you land the bloom change separately - if need be, stash/commit what you have
- a few Kotlin idiom suggestions in here - happy to pair up and walk through if that'd help
@@ -26,6 +28,16 @@ class LiveTable | |||
) : AutoCloseable { | |||
|
|||
private val trieWriter = TrieWriter(al, bp, false) | |||
private val trieMetadataBuilder = TrieMetadata.newBuilder() | |||
.setMinValidFrom(MAX_LONG) |
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.
may be able to default these in the protobuf instead...? 🤔
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 put it in the proto for now. The important bit to keep in mind is that if you build a TrieMetadata without calculating anything on it, the contained data doesn't make much sense.
table-cat/<-table-block | ||
:current-tries | ||
(mapv added-trie->edn )))) | ||
(let [current-tries (->> (.getByteArray bp (util/->path "tables/public$foo/blocks/b01.binpb")) |
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.
(out of scope of this PR) these are the tests that I'd like us to move to Kotlin too, given the code it's testing is. I understand we don't yet have the same level of fixtures there that we do in Clojure (which is why I have also done the same as you here), so when we next come up for air let's figure out what we need to make this easier
d981abb
to
dedb5d9
Compare
dedb5d9
to
b91c0dc
Compare
This addresses #4174. The new metadata is not (yet) used anywhere for pruning.
I am also moving a bunch of bloom logic to Kotlin.
Todo:
recency? wasn't sure if recency still plays a role in the new plans.- Add recency metadata to table-block files #4257
main