Skip to content

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

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
don't send empty tarball
  • Loading branch information
Sadanand Shenoy committed Apr 11, 2025
commit 04b94d597661440b3acd7a822d92862697750a1f
Original file line number Diff line number Diff line change
Expand Up @@ -154,27 +154,27 @@ public void writeDbDataToStream(DBCheckpoint checkpoint,
// Map of link to path.
Map<Path, Path> hardLinkFiles = new HashMap<>();

RocksDBCheckpointDiffer differ =
getDbStore().getRocksDBCheckpointDiffer();
DirectoryData sstBackupDir = new DirectoryData(tmpdir,
differ.getSSTBackupDir());
DirectoryData compactionLogDir = new DirectoryData(tmpdir,
differ.getCompactionLogDir());
// Files to be excluded from tarball
Map<String, Map<Path, Path>> sstFilesToExclude = normalizeExcludeList(toExcludeList,
checkpoint.getCheckpointLocation(), sstBackupDir);
boolean completed = getFilesForArchive(checkpoint, copyFiles,
hardLinkFiles, sstFilesToExclude, includeSnapshotData(request),
excludedList, sstBackupDir, compactionLogDir);
Map<Path, Path> flatCopyFiles = copyFiles.values().stream().flatMap(map -> map.entrySet().stream())
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));

try (TarArchiveOutputStream archiveOutputStream =
new TarArchiveOutputStream(destination)) {
archiveOutputStream
.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX);
archiveOutputStream
.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_POSIX);
RocksDBCheckpointDiffer differ =
getDbStore().getRocksDBCheckpointDiffer();
DirectoryData sstBackupDir = new DirectoryData(tmpdir,
differ.getSSTBackupDir());
DirectoryData compactionLogDir = new DirectoryData(tmpdir,
differ.getCompactionLogDir());

// Files to be excluded from tarball
Map<String, Map<Path, Path>> sstFilesToExclude = normalizeExcludeList(toExcludeList,
checkpoint.getCheckpointLocation(), sstBackupDir);
boolean completed = getFilesForArchive(checkpoint, copyFiles,
hardLinkFiles, sstFilesToExclude, includeSnapshotData(request),
excludedList, sstBackupDir, compactionLogDir);
Map<Path, Path> flatCopyFiles = copyFiles.values().stream().flatMap(map -> map.entrySet().stream())
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
writeFilesToArchive(flatCopyFiles, hardLinkFiles, archiveOutputStream,
completed, checkpoint.getCheckpointLocation());
} catch (Exception e) {
Expand Down