Skip to content

Conversation

@arunagrawal84
Copy link
Contributor

@arunagrawal84 arunagrawal84 commented Sep 20, 2019

We have supported Snappy as the only compression type while uploading the files. We wanted to support customizable compression types and thus support for LZ4 and no compression.
In this PR we make LZ4 as the default compression type for backup 2.0
Future work: Do not compress Data.db which are already compressed.

In this PR we have encapsulated the directives on how to upload or download a file to class UploadDownloadDirectives. This includes directives like compression, encryption, retries to use etc.

@codecov
Copy link

codecov bot commented Sep 20, 2019

Codecov Report

❌ Patch coverage is 65.43624% with 103 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.01%. Comparing base (c7f216c) to head (645c058).
⚠️ Report is 183 commits behind head on 3.x.

Files with missing lines Patch % Lines
.../main/java/com/netflix/priam/aws/S3FileSystem.java 25.80% 22 Missing and 1 partial ⚠️
...a/com/netflix/priam/aws/S3EncryptedFileSystem.java 0.00% 18 Missing ⚠️
...a/com/netflix/priam/backup/AbstractFileSystem.java 73.21% 8 Missing and 7 partials ⚠️
...c/main/java/com/netflix/priam/backup/MetaData.java 0.00% 8 Missing ⚠️
.../netflix/priam/backupv2/MetaFileWriterBuilder.java 0.00% 8 Missing ⚠️
...java/com/netflix/priam/backup/CommitLogBackup.java 0.00% 5 Missing ⚠️
...etflix/priam/google/GoogleEncryptedFileSystem.java 0.00% 4 Missing ⚠️
.../java/com/netflix/priam/backup/AbstractBackup.java 62.50% 1 Missing and 2 partials ⚠️
...a/com/netflix/priam/backup/AbstractBackupPath.java 94.11% 1 Missing and 2 partials ⚠️
...om/netflix/priam/restore/EncryptedRestoreBase.java 0.00% 3 Missing ⚠️
... and 9 more
Additional details and impacted files
@@             Coverage Diff              @@
##                3.x     #833      +/-   ##
============================================
+ Coverage     46.56%   47.01%   +0.45%     
- Complexity     1052     1063      +11     
============================================
  Files           166      169       +3     
  Lines          7280     7393     +113     
  Branches        746      760      +14     
============================================
+ Hits           3390     3476      +86     
- Misses         3638     3660      +22     
- Partials        252      257       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

* this to sometimes C* creating files which are zero bytes, and giving that in
* snapshot for some unknown reason.
*/
if (chunk.length > 0) rateLimiter.acquire(chunk.length);
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume we still want to proceed with the upload of this 0 byte file to keep our s3 snapshots consistent with C* snapshot view, and hence we do not skip the rest of the upload code path even if the file has 0 byte - is this correct?


// Cache hit. Return the value.
if (cacheResult != null) return cacheResult;
if (lastUpdatedTimestamp != null) return true;
Copy link
Contributor

Choose a reason for hiding this comment

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

since we do not really check the value of the timestamp, what difference does this make relative to having a Boolean? Maybe I will discover its importance in other fails, if I do, will delete this comment.

import java.time.temporal.ChronoUnit;
import javax.crypto.KeyGenerator;

public class s3test {
Copy link
Contributor

Choose a reason for hiding this comment

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

This class has a lot of commented code. Any reason for keeping the commented code?

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.

3 participants