-
Notifications
You must be signed in to change notification settings - Fork 537
HDDS-12778. Change ordering of transfer in OM bootstrap process. #8245
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @sadanand48 for the improvement. It will reduce unnecessary memtable flush and checkpoint creation for tarball.
What type of testing are we doing for it? Also, can you fix the test cases?
if (!processDir(dir, copyFiles, hardLinkFiles, sstFilesToExclude, | ||
new HashSet<>(), excluded, copySize, null)) { | ||
return false; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove this extra line.
if (LOG.isDebugEnabled()) { | ||
if (processedSnapshotData) { | ||
LOG.debug("Finished processing OM snapshot data"); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: there is no need to do LOG.isDebugEnabled()
check for a simple string. It is useful when String concatenation is needed.
if (LOG.isDebugEnabled()) { | |
if (processedSnapshotData) { | |
LOG.debug("Finished processing OM snapshot data"); | |
} | |
} | |
if (processedSnapshotData) { | |
LOG.debug("Finished processing OM snapshot data"); | |
} |
Alternatively
if (LOG.isDebugEnabled() && processedSnapshotData) {
LOG.debug("Finished processing OM snapshot data");
}
boolean processedTmpSstCompactionDir = processDir(sstBackupDir.getTmpDir().toPath(), | ||
copyFiles, hardLinkFiles, sstFilesToExclude, new HashSet<>(), | ||
excluded, copySize, sstBackupDir.getOriginalDir().toPath()); | ||
if (LOG.isDebugEnabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous.
boolean processedTmpSstCompactionDir = processDir(sstBackupDir.getTmpDir().toPath(), | ||
copyFiles, hardLinkFiles, sstFilesToExclude, new HashSet<>(), | ||
excluded, copySize, sstBackupDir.getOriginalDir().toPath()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boolean processedTmpSstCompactionDir = processDir(sstBackupDir.getTmpDir().toPath(), | |
copyFiles, hardLinkFiles, sstFilesToExclude, new HashSet<>(), | |
excluded, copySize, sstBackupDir.getOriginalDir().toPath()); | |
boolean processedSstCompactionBackupDir = processDir(sstBackupDir.getTmpDir().toPath(), | |
copyFiles, hardLinkFiles, sstFilesToExclude, new HashSet<>(), | |
excluded, copySize, sstBackupDir.getOriginalDir().toPath()); |
boolean processedTmpCompactionLogDir = processDir(compactionLogDir.getTmpDir().toPath(), | ||
copyFiles, hardLinkFiles, sstFilesToExclude, new HashSet<>(), | ||
excluded, copySize, compactionLogDir.getOriginalDir().toPath()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: let's just call it processedCompactionLogDir
. We create tmp for local referencing only.
boolean processedTmpCompactionLogDir = processDir(compactionLogDir.getTmpDir().toPath(), | |
copyFiles, hardLinkFiles, sstFilesToExclude, new HashSet<>(), | |
excluded, copySize, compactionLogDir.getOriginalDir().toPath()); | |
boolean processedCompactionLogDir = processDir(compactionLogDir.getTmpDir().toPath(), | |
copyFiles, hardLinkFiles, sstFilesToExclude, new HashSet<>(), | |
excluded, copySize, compactionLogDir.getOriginalDir().toPath()); |
@@ -380,18 +408,24 @@ private Set<Path> getSnapshotDirs(DBCheckpoint checkpoint, boolean waitForDir) | |||
iterator = checkpointMetadataManager | |||
.getSnapshotInfoTable().iterator()) { | |||
|
|||
// For each entry, wait for corresponding directory. | |||
// For each entry, wait for corresponding directory if the key is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we assuming that whatever is flushed to disk must have a snapshot directory?
@@ -114,10 +114,17 @@ public static void createHardLinks(Path dbPath) throws IOException { | |||
|
|||
// Create a link for each line. | |||
for (String l : lines) { | |||
String from = l.split("\t")[1]; | |||
String to = l.split("\t")[0]; | |||
String[] parts = l.split("\t"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there test code added for the new change in createHardLinks?
omCheckpointUrl + ". ErrorCode: " + errorCode); | ||
omCheckpointUrl + ". ErrorCode: " + errorCode; | ||
LOG.error(message); | ||
throw new IOException(message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- connection object should call disconnect() before throwing the exception.
- This is unrelated, but the caller of this method, RDBSnapProvider.downloadDBSnapshotFromLeader() does not retry on exception. Should an exception be retried?
* @param lines Text lines defining the link paths. | ||
* @param testDirName Name of test directory. | ||
*/ | ||
private void checkFabricatedLines(Set<String> directories, List<String> lines, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed because the usage is removed.
What changes were proposed in this pull request?
The following changes are done:
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-12778