Details
Description
During the snapshot restore procedure after retrieving the partition file from the remote node, we create an additional copy of this file.
for (Map.Entry<UUID, Map<Integer, Set<Integer>>> m : snpAff.entrySet()) { ctx.cache().context().snapshotMgr() .requestRemoteSnapshotFiles(m.getKey(), opCtx0.snpName, m.getValue(), opCtx0.stopChecker, (snpFile, t) -> { ... Path partFile = Paths.get(tmpCacheDir.getAbsolutePath(), snpFile.getName()); try { IgniteSnapshotManager.copy(snpMgr.ioFactory(), snpFile, partFile.toFile(), snpFile.length()); ...
File copying is redundant here and can have significant performance overhead.
Instead, we have to download the file to the target directory (and rename it to the desired name if necessary).
Attachments
Issue Links
- links to