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

chore: remove phf from static files #10259

Merged
merged 15 commits into from
Aug 30, 2024
Merged

chore: remove phf from static files #10259

merged 15 commits into from
Aug 30, 2024

Conversation

nkysg
Copy link
Contributor

@nkysg nkysg commented Aug 11, 2024

Closes #9946

use empty enum as dummy Functions

@shekhirin shekhirin added C-debt Refactor of code section that is hard to understand or maintain A-static-files Related to static files labels Aug 12, 2024
@joshieDo
Copy link
Collaborator

thanks!

i'd say we can just remove the whole thing, struct + trait, leaving only an optional field for backwards compatibility

@nkysg
Copy link
Contributor Author

nkysg commented Aug 14, 2024

I have implemented a dummy Functions. Some function I don't familiar with , I just keep it. PTAL @joshieDo @shekhirin . Thx.

Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also remove this

// Builds perfect hashing function from the values
if let Some(phf) = self.phf.as_mut() {
debug!(target: "nippy-jar", ?row_count, values_count = ?values.len(), "Setting keys for perfect hashing function.");
phf.set_keys(&values)?;
}
, so it will not require us to have set_keys implemented anymore, and we can have just an empty enum or any other dummy field even without a hashmap.

@nkysg
Copy link
Contributor Author

nkysg commented Aug 15, 2024

remove whole struct and trait, PTAL. @joshieDo @shekhirin Thx.

@nkysg nkysg requested a review from shekhirin August 15, 2024 03:31
Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost there, also @joshieDo PTAL

crates/storage/nippy-jar/src/lib.rs Outdated Show resolved Hide resolved
@nkysg nkysg requested a review from shekhirin August 15, 2024 04:16
Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, LGTM! Waiting for @joshieDo review, and we will also need to check that this doesn't break existing clients.

@mattsse mattsse changed the title remove phf from static files chore: remove phf from static files Aug 22, 2024
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ptal @joshieDo

crates/storage/nippy-jar/src/cursor.rs Outdated Show resolved Hide resolved
@nkysg nkysg requested a review from rakita as a code owner August 22, 2024 12:41
@joshieDo
Copy link
Collaborator

looks good, just want to be sure and test it myself. either today or tomorrow 🫡

@emhane
Copy link
Member

emhane commented Aug 25, 2024

@joshieDo status on testing?

Copy link
Collaborator

@joshieDo joshieDo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, pushed test_config_serialization. we can also remove the filter in a follow-up

would merge after release though

@nkysg
Copy link
Contributor Author

nkysg commented Aug 28, 2024

lgtm, pushed test_config_serialization. we can also remove the filter in a follow-up

would merge after release though

Wonder do some follow-up .

@emhane
Copy link
Member

emhane commented Aug 28, 2024

lgtm, pushed test_config_serialization. we can also remove the filter in a follow-up

would merge after release though

would you open an issue pls @joshieDo ? or @nkysg if you have enough context?

@nkysg
Copy link
Contributor Author

nkysg commented Aug 28, 2024

I think its this place.

pub enum PerfectHashingFunction {
#[strum(serialize = "fmph")]
/// Fingerprint-Based Minimal Perfect Hash Function
Fmph,
#[strum(serialize = "gofmph")]
/// Fingerprint-Based Minimal Perfect Hash Function with Group Optimization
GoFmph,
}

@emhane . right @joshieDo ?

@nkysg
Copy link
Contributor Author

nkysg commented Aug 30, 2024

It seems that can merge. And I wonder do some follow-up. @shekhirin @joshieDo

@mattsse mattsse enabled auto-merge August 30, 2024 06:43
@mattsse mattsse added this pull request to the merge queue Aug 30, 2024
Merged via the queue into paradigmxyz:main with commit 28e46bf Aug 30, 2024
35 checks passed
@nkysg nkysg deleted the remove_phf branch August 30, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-static-files Related to static files C-debt Refactor of code section that is hard to understand or maintain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove PHF from Static Files
5 participants