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

builder: introduce chunkdict save subcommand #1305

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

cslinwang
Copy link
Contributor

@cslinwang cslinwang commented May 27, 2023

Relevant Issue (if applicable)

N/A

Details

These commits introduce the following changes:

Background: In high-density deployment scenarios, the issue of redundant storage and distribution of chunks in Nydus images poses significant challenges. This problem leads to inefficient utilization of storage space and excessive consumption of bandwidth resources. To address this problem, it is crucial to design an effective chunk deduplication mechanism. This entails conducting in-depth research on chunk deduplication algorithms and developing solutions that enable deduplication across different business contexts, within the same business, across different layers, and within the same layer. By implementing comprehensive chunk deduplication strategies, we can significantly optimize storage utilization and enhance bandwidth efficiency in high-density deployment environments.

  1. Commit: "cargo: Add rusqlite package to dependencies"

    • Adds the 'rusqlite' package to the project's dependencies.
    • Updates the 'cargo.toml' file to include the 'rusqlite' package.
    • Enables interaction with SQLite databases in the project.
  2. Commit: "nydus-image: Store chunk and blob metadata"

    • Adds functionality to store chunk and blob metadata from nydus source images.
    • Introduces the 'nydus-image chunkdict save' command.
    • Allows storing metadata by using the '--bootstrap' option followed by the path to the nydus bootstrap file (e.g., '~/output/nydus_bootstrap').

Types of changes

What types of changes do your commits introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

Go over all the following points, and put an x in all the boxes that apply:

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@cslinwang cslinwang requested a review from a team as a code owner May 27, 2023 07:54
@cslinwang cslinwang requested review from liubogithub, changweige and adamqqqplay and removed request for a team May 27, 2023 07:54
@anolis-bot
Copy link
Collaborator

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

@codecov
Copy link

codecov bot commented May 27, 2023

Codecov Report

Merging #1305 (1158dae) into master (f419349) will increase coverage by 0.07%.
Report is 1 commits behind head on master.
The diff coverage is 53.33%.

❗ Current head 1158dae differs from pull request most recent head d737c65. Consider uploading reports for the commit d737c65 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1305      +/-   ##
==========================================
+ Coverage   46.31%   46.39%   +0.07%     
==========================================
  Files         122      123       +1     
  Lines       38077    38557     +480     
  Branches    38077    38557     +480     
==========================================
+ Hits        17635    17888     +253     
- Misses      19518    19698     +180     
- Partials      924      971      +47     
Files Changed Coverage Δ
src/bin/nydus-image/main.rs 40.99% <52.43%> (+0.66%) ⬆️
src/bin/nydus-image/deduplicate.rs 53.51% <53.51%> (ø)

... and 4 files with indirect coverage changes

@anolis-bot
Copy link
Collaborator

@cslinwang , the title 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/75719

@anolis-bot
Copy link
Collaborator

@cslinwang , the title 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/75720

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux❌ FAIL

Sorry, your test job failed. Please get the details in the link.

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
nydus_ci❌ FAIL

Sorry, your test job failed. Please get the details in the link.

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
nydus_ci❌ FAIL

Sorry, your test job failed. Please get the details in the link.

@Desiki-high
Copy link
Member

/retest

@anolis-bot
Copy link
Collaborator

@Desiki-high , the test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/75722

@anolis-bot
Copy link
Collaborator

@Desiki-high , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

Copy link
Member

@adamqqqplay adamqqqplay left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. This feature looks interesting, but maybe it could be more closely integrated with previous work #956 ?

I've made some suggestions to your code. Also, some unit tests need to be added and the docs/nydus-image.md document updated. Thanks in advance.

Cargo.toml Outdated Show resolved Hide resolved
Cargo.lock Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Show resolved Hide resolved
src/bin/nydus-image/main.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
@imeoer imeoer changed the title cargo: Add rusqlite package to dependencies and nydus-image: Store chunk and blob metadata builder: introduce chunkdict save subcommand May 30, 2023
@anolis-bot
Copy link
Collaborator

@imeoer , the title 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/76031

@anolis-bot
Copy link
Collaborator

@cslinwang , 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/89153

@cslinwang cslinwang force-pushed the linwang-dev branch 2 times, most recently from 06d7c9a to 16a1609 Compare August 4, 2023 08:48
@anolis-bot
Copy link
Collaborator

@cslinwang , 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/89157

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/deduplicate.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/main.rs Outdated Show resolved Hide resolved
@anolis-bot
Copy link
Collaborator

@cslinwang , 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/89524

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

Cargo.toml Show resolved Hide resolved
src/bin/nydus-image/main.rs Outdated Show resolved Hide resolved
Updates 'Cargo.toml' and 'Cargo.lock' files to include the 'rusqlite' package.
Enabling interaction with SQLite databases in the project.

Signed-off-by: Lin Wang <[email protected]>
Add functionality to store chunk and blob metadata
from nydus source images.
Use the 'nydus-image chunkdict save' command
with the '--bootstrap' option followed by the
path to the nydus bootstrap file (e.g., '~/output/nydus_bootstrap')

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

@cslinwang , 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/89672

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

Copy link
Collaborator

@imeoer imeoer left a comment

Choose a reason for hiding this comment

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

LGTM!

@imeoer imeoer merged commit 8a93024 into dragonflyoss:master Aug 8, 2023
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants