Open
Conversation
Merged
with '#' will be ignored, and an empty message aborts the commit.
thinkingfish
approved these changes
Oct 11, 2022
|
|
||
| /// The number of hash functions that are evaluated for each value inserted.F | ||
| #[serde(default = "hashes")] | ||
| pub hashes: usize, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
brayniac
suggested changes
Oct 25, 2022
| @@ -0,0 +1,42 @@ | |||
| // Copyright 2021 Twitter, Inc. | |||
| #[serde(default = "size")] | ||
| pub size: usize, | ||
|
|
||
| /// The number of hash functions that are evaluated for each value inserted.F |
| seg = { path = "../storage/seg" } No newline at end of file | ||
| protocol-http = { path = "../protocol/http" } | ||
| seg = { path = "../storage/seg" } | ||
| bloom = { path = "../storage/bloom" } No newline at end of file |
Contributor
There was a problem hiding this comment.
Would prefer alphabetical ordering
| @@ -0,0 +1,54 @@ | |||
| // Copyright 2021 Twitter, Inc. | |||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| use protocol_common::Execute; | ||
| use protocol_http::{ |
Contributor
There was a problem hiding this comment.
I'd rather not use this style here and would prefer two use statements.
| @@ -0,0 +1,34 @@ | |||
| // Copyright 2021 Twitter, Inc. | |||
| impl Bloom { | ||
| /// Create a bloom filter storage based on the config. | ||
| pub fn new<T: BloomConfig>(config: &T) -> Result<Self, std::io::Error> { | ||
| // TODO: Validate the config here and return an error. |
Contributor
There was a problem hiding this comment.
Generally we've been putting names on the TODOs - eg: TODO(bmartin):
| @@ -0,0 +1,51 @@ | |||
| // Copyright 2021 Twitter, Inc. | |||
| @@ -0,0 +1,96 @@ | |||
| // Copyright 2021 Twitter, Inc. | |||
| fn main() { | ||
| // custom panic hook to terminate whole process after unwinding | ||
| std::panic::set_hook(Box::new(|s| { | ||
| error!("{}", s); |
Contributor
There was a problem hiding this comment.
Change this to eprintln please. We don't guarantee the log is flushed before terminating and having the error message lost is not a great experience.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is code-complete and lightly tested. I haven't tested this beyond some basic smoke tests but ultimately the code is pretty simple.