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

231 pass and store timestamp within record #232

Merged
merged 28 commits into from
Sep 22, 2023

Conversation

ikopylov
Copy link
Member

@ikopylov ikopylov commented Jan 14, 2023

Closes #231
Closes #229
Closes #276
Closes #241

@ikopylov ikopylov marked this pull request as ready for review January 14, 2023 22:21
src/blob/core.rs Outdated
@@ -262,28 +262,22 @@ where
Ok(header)
}

pub(crate) async fn read_last(
#[allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this allow is needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

read_latest is no longer used. Since this request Storage uses get_latest_entry. I thought it might be worth keeping this function for the future. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to just keep in git history since it can make it harder to refactor code

Copy link
Member Author

Choose a reason for hiding this comment

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

I've removed this function

Copy link
Contributor

Choose a reason for hiding this comment

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

What about other dead_code allowances, they should be there?

Copy link
Member Author

Choose a reason for hiding this comment

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

If we assume that the only way to read data now is by getting Entry first, then we should keep read_all_entries.
contains is questionable, but as long as it is implemented as a simple redirection to get_latest_entry, we can keep it. It is good to have such function just as a declaration, that the struct supports fast checking for existence.

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed all dead code

src/blob/entry.rs Outdated Show resolved Hide resolved
src/storage/core.rs Show resolved Hide resolved
src/blob/index/core.rs Show resolved Hide resolved
Copy link
Contributor

@idruzhitskiy idruzhitskiy left a comment

Choose a reason for hiding this comment

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

LGTM

@ikopylov ikopylov merged commit 7a1a24f into master Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment