Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-16150

Get rid of redundant copying of files after downloading when restoring a snapshot.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.12
    • 2.13
    • None
    • Improved snapshot partitions move
    • Release Notes Required

    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

        Activity

          People

            xtern Pavel Pereslegin
            xtern Pavel Pereslegin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m