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

Add an example of LVMT to LvmtStorage struct #19

Merged
merged 7 commits into from
Jan 7, 2025
Merged

Conversation

rongma7
Copy link
Contributor

@rongma7 rongma7 commented Jan 3, 2025

This change is Reviewable

@rongma7 rongma7 requested a review from ChenxingLi January 3, 2025 07:07
Copy link
Contributor

@ChenxingLi ChenxingLi left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 6 files at r1, all commit messages.
Reviewable status: 4 of 6 files reviewed, 1 unresolved discussion (waiting on @rongma7)


src/middlewares/versioned_flat_key_value/mod.rs line 141 at r1 (raw file):

    to_confirm_start_height: usize,
    to_confirm_ids_maps: Vec<(CommitID, BTreeMap<T::Key, impl Into<Option<T::Value>>>)>,
    is_first_t: bool,

What does it mean?

Copy link
Contributor Author

@rongma7 rongma7 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 of 7 files reviewed, 1 unresolved discussion (waiting on @ChenxingLi)


src/middlewares/versioned_flat_key_value/mod.rs line 141 at r1 (raw file):

Previously, ChenxingLi (Chenxing Li) wrote…

What does it mean?

Done.

Copy link
Contributor

@ChenxingLi ChenxingLi left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 5 files at r2, 1 of 1 files at r3.
Reviewable status: 6 of 7 files reviewed, 3 unresolved discussions (waiting on @rongma7)


src/middlewares/versioned_flat_key_value/pending_part/versioned_map.rs line 126 at r3 (raw file):

        &mut self,
        commit_id: S::CommitId,
    ) -> PendResult<(usize, Vec<S::CommitId>, Vec<KeyValueMap<S>>), S> {

Consider define a struct for the return value here.


src/middlewares/versioned_flat_key_value/mod.rs line 194 at r3 (raw file):

    write_schema: &D::WriteSchema,
) -> Result<()> {
    let commit_id_table = Arc::new(db.view::<CommitIDSchema>()?);

Why do you need Arc?


src/middlewares/versioned_flat_key_value/mod.rs line 220 at r3 (raw file):

    }

    std::mem::drop(commit_id_table);

The object will be dropped automatically at the end of the function. It is not necessary to manually drop them.

Copy link
Contributor Author

@rongma7 rongma7 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 3 of 9 files reviewed, 3 unresolved discussions (waiting on @ChenxingLi)


src/middlewares/versioned_flat_key_value/mod.rs line 194 at r3 (raw file):

Previously, ChenxingLi (Chenxing Li) wrote…

Why do you need Arc?

Done.


src/middlewares/versioned_flat_key_value/mod.rs line 220 at r3 (raw file):

Previously, ChenxingLi (Chenxing Li) wrote…

The object will be dropped automatically at the end of the function. It is not necessary to manually drop them.

Done.


src/middlewares/versioned_flat_key_value/pending_part/versioned_map.rs line 126 at r3 (raw file):

Previously, ChenxingLi (Chenxing Li) wrote…

Consider define a struct for the return value here.

Done.

Copy link
Contributor

@ChenxingLi ChenxingLi left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 6 files at r4, all commit messages.
Reviewable status: 7 of 9 files reviewed, 2 unresolved discussions

@rongma7 rongma7 force-pushed the lvmt_example branch 4 times, most recently from 5cf33f7 to 8a7fbac Compare January 7, 2025 03:15
Copy link
Contributor

@ChenxingLi ChenxingLi left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 6 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @rongma7)

@rongma7 rongma7 merged commit 09587a2 into master Jan 7, 2025
2 checks passed
@rongma7 rongma7 deleted the lvmt_example branch January 7, 2025 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants