-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
added support for incremental download of translog files #16204
base: main
Are you sure you want to change the base?
added support for incremental download of translog files #16204
Conversation
❌ Gradle check result for cd08d89: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
cd08d89
to
f17a378
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16204 +/- ##
============================================
+ Coverage 71.94% 72.02% +0.07%
- Complexity 64612 64643 +31
============================================
Files 5298 5300 +2
Lines 301952 302060 +108
Branches 43627 43648 +21
============================================
+ Hits 217247 217556 +309
+ Misses 66884 66627 -257
- Partials 17821 17877 +56 ☔ View full report in Codecov by Sentry. |
f17a378
to
b8f56ea
Compare
❌ Gradle check result for b8f56ea: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
b8f56ea
to
833b508
Compare
Presently, the download workflow for remote backed storage works in a manner which causes the download for same translog files multiple times, each time deleting all the older files before downloading them again. This causes significant wasted network bandwidth, along with the time taken for the shard to become active. This change adds support for downloading the translog files incrementally and omitting the same if they are present locally. Signed-off-by: Harsh Rawat <[email protected]>
This commit adds the unit tests applicable for the changes made to support incremental download of translog files. Primarily, the unit tests cover the changes in- - TranslogFooter to write and read the footer of Translog - RemoteFSTranslog to skip the download of locally present translog - TranslogWriter to create reader with checksum upon close - TranslogReader closeIntoReader functionality Signed-off-by: Harsh Rawat <[email protected]>
833b508
to
535bc28
Compare
❌ Gradle check result for 535bc28: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Description
Presently, the download workflow for remote backed storage works in a manner that causes the download of the same translog files multiple times, each time deleting all the older files before downloading them again. This causes significant wasted network bandwidth, along with the time taken for the shard to become active.
This change adds support for downloading the translog files incrementally and omitting the same if they are present locally.
Implementation
The key changes include-
Incremental Download Logic in RemoteFsTranslog:
Translog Footer Handling:
Generation-to-Checksum Mapping in TranslogTransferMetadata:
Testing
RemoteFsTranslogTests
class has been updated to include new test cases for the incremental download logic:testIncrementalDownloadWithMatchingChecksum
tests the scenario where the local and remote translog files have the same checksum, and the download is skipped.testIncrementalDownloadWithDifferentChecksum
tests the scenario where the local and remote translog files have different checksums, and only the missing generation is downloaded.TranslogFooterTests
class has been added to verify the functionality of theTranslogFooter
class, including writing and reading the footer.TranslogTransferMetadataHandlerTests
class has been updated to include test cases for handling the generation-to-checksum map in theTranslogTransferMetadata
.Related Issues
One of the optimisations for #15277
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.