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

DotName componentization #176

Merged
merged 3 commits into from
Mar 23, 2022
Merged

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Mar 15, 2022

Fixes #175

Previously, when serializing the name table, we'd store the "depth"
of the currently serialized name, and during deserialization, we'd
look at the previously deserialized name and take its prefix "depth"
times in hope that we'll obtain the correct prefix. That usually
works, but fails with weird names using the `$` character.

With this commit, we no longer store the "depth" of a name. Instead,
we store an offset to the name table where the prefix is found.
Since names are serialized in order, the prefix must have already
been written. And since the offset is always negative, we actually
store its absolute value to save space (the packed U32 format is
able to store negative values, but it is inefficient).

This change requires persistent format version bump. That has already
happened on the `smallrye` branch, so this commit doesn't bump
again, but note that this commit can't be backported to Jandex 2.x.
@Ladicek Ladicek added this to the 3.0.0 milestone Mar 15, 2022
@Ladicek Ladicek linked an issue Mar 15, 2022 that may be closed by this pull request
@Ladicek Ladicek merged commit 801a8d9 into smallrye:smallrye Mar 23, 2022
@Ladicek Ladicek deleted the dotname-componentization branch March 23, 2022 07:38
@Ladicek Ladicek added the serialization-format-change Changes that affect index serialization format label Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
serialization-format-change Changes that affect index serialization format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IllegalStateException during indexing
1 participant