Skip to content

rafs: optimize entry search in rafs v6 #683

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

Merged

Conversation

yixiaojie0x
Copy link

Implement binary search in rafs/src/metadata/direct_v6.rs
get_child_by_name() to accelerate entry search.

Signed-off-by: yixiaojie [email protected]

@anolis-bot
Copy link
Collaborator

@yixiaojie0x , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/18555

@anolis-bot
Copy link
Collaborator

@yixiaojie0x , The CI test is completed, please check result:

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

@yixiaojie0x
Copy link
Author

This PR is for #667
It worked well functionally in my views, and it may need more tests/reviews. Any suggestions will be appreciated: )

let nid = 'outer: for i in 0..blocks_count {
let head_entry = self.get_entry(i as usize, 0).map_err(err_invalidate_data)?;
// `e_nameoff` is offset from each single block?
// find target block
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about extracting this as a helper function?
And seems it may simplify by using usize instead of i32?

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@yixiaojie0x yixiaojie0x force-pushed the optimize_entry_search_in_rafsv6 branch from 8e2f307 to 981567b Compare August 18, 2022 06:20
@anolis-bot
Copy link
Collaborator

@yixiaojie0x , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/18633

@anolis-bot
Copy link
Collaborator

@yixiaojie0x , The CI test is completed, please check result:

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

Implement binary search in rafs/src/metadata/direct_v6.rs
get_child_by_name() to accelerate entry search.

Signed-off-by: yixiaojie <[email protected]>
@anolis-bot
Copy link
Collaborator

@yixiaojie0x , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/18641

@anolis-bot
Copy link
Collaborator

@yixiaojie0x , The CI test is completed, please check result:

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

@jiangliu jiangliu merged commit cc9b1fe into dragonflyoss:master Aug 18, 2022
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.

4 participants