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

HDDS-12064. Optimize bootstrap logic to reduce loop while checking file links #7676

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

swamirishi
Copy link
Contributor

What changes were proposed in this pull request?

Currently while checking file links, the exclude sst file list & files already present in the current tarball is checked in the entries by sequentially iterating through the entries, for each and every file in the om data directory (snapshot directory, active om.db, compaction backup sst file). Now if the exclude list or files present in the tarball is really long order of 1000s and the total number of sst files are in the order of millions, the bootstrap is going to read timeout and might take hours. We need to optimize and not perform this unnecessary iteration to avoid this n^2 operation and do it in O

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-12064

How was this patch tested?

Existing unit tests modification

…le links

Change-Id: I6871db471adc1790ac3a0ff295a4db6eeb7608ad
Change-Id: If6f300d6068c4be2c8da99fdef3ae8495680d5ea
@swamirishi swamirishi marked this pull request as ready for review January 10, 2025 22:52
Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @swamirishi for the patch.

Change-Id: Ic2b623cdb5ea6cbdcfad2b82ebb11bad62caa6d2
Change-Id: I03befbcab5d08add580c44cc7ee52dbfaeb101ba
@swamirishi
Copy link
Contributor Author

@adoroszlai @prashantpogde if you don't have any issues with the patch. Can you give me a +1 for this patch?

Copy link
Contributor

@prashantpogde prashantpogde left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Thank you for making these changes @swamirishi

@swamirishi
Copy link
Contributor Author

Thanks for the review on the patch @prashantpogde @adoroszlai

@swamirishi swamirishi merged commit 6c41a9a into apache:master Jan 15, 2025
42 checks passed
@adoroszlai
Copy link
Contributor

@swamirishi please trim extended details when merging:

    HDDS-12064. Optimize bootstrap logic to reduce loop while checking file links (#7676)
    
    * HDDS-12064. Optimize bootstrap logic to reduce loop while checking file links
    
    Change-Id: I6871db471adc1790ac3a0ff295a4db6eeb7608ad
    
    * HDDS-12064. Fix findbugs
    
    Change-Id: If6f300d6068c4be2c8da99fdef3ae8495680d5ea
    
    * HDDS-12064. Address review comments
    
    Change-Id: Ic2b623cdb5ea6cbdcfad2b82ebb11bad62caa6d2
    
    * HDDS-12064. Address review comments
    
    Change-Id: I03befbcab5d08add580c44cc7ee52dbfaeb101ba

@nandakumar131
Copy link
Contributor

@swamirishi please trim extended details when merging:

    HDDS-12064. Optimize bootstrap logic to reduce loop while checking file links (#7676)
    
    * HDDS-12064. Optimize bootstrap logic to reduce loop while checking file links
    
    Change-Id: I6871db471adc1790ac3a0ff295a4db6eeb7608ad
    
    * HDDS-12064. Fix findbugs
    
    Change-Id: If6f300d6068c4be2c8da99fdef3ae8495680d5ea
    
    * HDDS-12064. Address review comments
    
    Change-Id: Ic2b623cdb5ea6cbdcfad2b82ebb11bad62caa6d2
    
    * HDDS-12064. Address review comments
    
    Change-Id: I03befbcab5d08add580c44cc7ee52dbfaeb101ba

+1

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