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

Snapshot restore operation may hang if cache contains "empty" partitions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.12
    • 2.12
    • None

    Description

      The snapshot restore may hang when some of the cache group partitions have not been physically created (for example, there is not enough data in the cache).

      Reproducer

      public class IgniteClusterSnapshotRestoreEmptyPartsTest extends IgniteClusterSnapshotRestoreBaseTest {
          @Test
          public void testRestoreWithEmptyPartition() throws Exception {
              // Cache with 1024 partitions.
              CacheConfiguration<Integer, Object> cacheCfg1 = new CacheConfiguration<>(CACHE1);
      
              // Add only 10 keys (only 10 partitions will be created on the disk).
              IgniteEx ignite = startGridsWithCache(1, 10, Integer::new, cacheCfg1);
      
              // Snapshot contains only 10 (out of 1024 "affinity" partitions).
              ignite.snapshot().createSnapshot(SNAPSHOT_NAME).get(TIMEOUT);
      
              ignite.cache(CACHE1).destroy();
      
              // The restore operation hangs during the "preload" phase.
              ignite.snapshot().restoreSnapshot(SNAPSHOT_NAME, null).get(TIMEOUT);
          }
      }
      

      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