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

.NET: Platform cache is not restored from persistent storage on node restart

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.13
    • platforms
    • .NET: Fixed platform cache not restoring data from persistent storage after node restart.
    • Release Notes Required

    Description

      When persistence is enabled and node restarts, platform cache is empty and remains empty even after read operations.

      var cfg = new IgniteConfiguration
      {
          DataStorageConfiguration = new DataStorageConfiguration
          {
              DefaultDataRegionConfiguration = new DataRegionConfiguration
              {
                  Name = DataStorageConfiguration.DefaultDataRegionName,
                  PersistenceEnabled = true
              }
          }
      };
      
      var cacheCfg = new CacheConfiguration
      {
          Name = "c",
          PlatformCacheConfiguration = new()
      };
      
      using (var ignite = Ignition.Start(cfg))
      {
          ignite.GetCluster().SetActive(true);
      
          var cache = ignite.GetOrCreateCache<int, int>(cacheCfg);
          cache[1] = 1;
          Console.WriteLine(">>> Cache size:" + cache.GetSize());
          Console.WriteLine(">>> Platform cache size:" + cache.GetLocalSize(CachePeekMode.Platform));
      }
      
      using (var ignite = Ignition.Start(cfg))
      {
          ignite.GetCluster().SetActive(true);
      
          var cache = ignite.GetOrCreateCache<int, int>(cacheCfg);
          Console.WriteLine(">>> Cache size:" + cache.GetSize());
          Console.WriteLine(">>> Platform cache size:" + cache.GetLocalSize(CachePeekMode.Platform));
      }
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ptupitsyn Pavel Tupitsyn
            ptupitsyn Pavel Tupitsyn
            Igor Sapego Igor Sapego
            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 - 10m
              10m

              Slack

                Issue deployment