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

.NET: Persistence does not work with custom affinity function

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.6
    • Component/s: platforms
    • Labels:
    • Release Note:
      .NET: Native persistence now works with a custom affinity function
    • Ignite Flags:
      Docs Required, Release Notes Required

      Description

      To reproduce: assign custom affinity function in PersistenceTest.TestCacheDataSurvivesNodeRestart.

      As a result, node restart fails with the following exception:

      Apache.Ignite.Core.Common.IgniteException : An error occurred during cache configuration loading from file [file=C:\Users\tps0\AppData\Local\Temp\Ignite_ihxso0zq.tw0\Store\node00-263cfb5e-ec70-4378-8cbb-62b6fcc8043b\cache-persistentCache\cache_data.dat]
        ----> Apache.Ignite.Core.Common.JavaException : class org.apache.ignite.IgniteException: An error occurred during cache configuration loading from file [file=C:\Users\tps0\AppData\Local\Temp\Ignite_ihxso0zq.tw0\Store\node00-263cfb5e-ec70-4378-8cbb-62b6fcc8043b\cache-persistentCache\cache_data.dat]
      	at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1027)
      	at org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:48)
      	at org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:74)
      Caused by: class org.apache.ignite.IgniteCheckedException: An error occurred during cache configuration loading from file [file=C:\Users\tps0\AppData\Local\Temp\Ignite_ihxso0zq.tw0\Store\node00-263cfb5e-ec70-4378-8cbb-62b6fcc8043b\cache-persistentCache\cache_data.dat]
      	at org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.readCacheData(FilePageStoreManager.java:902)
      	at org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.readCacheConfigurations(FilePageStoreManager.java:844)
      	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.addCacheOnJoinFromConfig(GridCacheProcessor.java:891)
      	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.restoreCacheConfigurations(GridCacheProcessor.java:756)
      	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.access$1300(GridCacheProcessor.java:204)
      	at org.apache.ignite.internal.processors.cache.GridCacheProcessor$CacheRecoveryLifecycle.onReadyForRead(GridCacheProcessor.java:5456)
      	at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.notifyMetastorageReadyForRead(GridCacheDatabaseSharedManager.java:412)
      	at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.readMetastore(GridCacheDatabaseSharedManager.java:724)
      	at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.notifyMetaStorageSubscribersOnReadyForRead(GridCacheDatabaseSharedManager.java:4473)
      	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1047)
      	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2040)
      	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1732)
      	at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1158)
      	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:656)
      	at org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:43)
      	... 1 more
      Caused by: class org.apache.ignite.IgniteCheckedException: Failed to deserialize object with given class loader: sun.misc.Launcher$AppClassLoader@18b4aac2
      	at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:147)
      	at org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:93)
      	at org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.readCacheData(FilePageStoreManager.java:898)
      	... 15 more
      Caused by: java.lang.IllegalArgumentException: Ignite instance name thread local must be set or this method should be accessed under org.apache.ignite.thread.IgniteThread
      	at org.apache.ignite.internal.IgnitionEx.localIgnite(IgnitionEx.java:1413)
      	at org.apache.ignite.internal.binary.GridBinaryMarshaller.threadLocalContext(GridBinaryMarshaller.java:398)
      	at org.apache.ignite.internal.binary.BinaryObjectImpl.readExternal(BinaryObjectImpl.java:695)
      	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:2116)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2065)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
      	at org.apache.ignite.internal.processors.platform.cache.affinity.PlatformAffinityFunction.readExternal(PlatformAffinityFunction.java:257)
      	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:2116)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2065)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
      	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2285)
      	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2209)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2067)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
      	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2285)
      	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2209)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2067)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
      	at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:139)
      	... 17 more
      
         at Apache.Ignite.Core.Ignition.Start(IgniteConfiguration cfg) in C:\w\ignite\modules\platforms\dotnet\Apache.Ignite.Core\Ignition.cs:line 323
         at Apache.Ignite.Core.Tests.Cache.PersistenceTest.TestCacheDataSurvivesNodeRestart() in C:\w\ignite\modules\platforms\dotnet\Apache.Ignite.Core.Tests\Cache\PersistenceTest.cs:line 132
      --JavaException
         at Apache.Ignite.Core.Impl.Unmanaged.Jni.Env.ExceptionCheck() in C:\w\ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Unmanaged\Jni\Env.cs:line 490
         at Apache.Ignite.Core.Impl.Unmanaged.Jni.Env.CallStaticVoidMethod(GlobalRef cls, IntPtr methodId, Int64* argsPtr) in C:\w\ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Unmanaged\Jni\Env.cs:line 169
         at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils.IgnitionStart(Env env, String cfgPath, String gridName, Boolean clientMode, Boolean userLogger, Int64 igniteId, Boolean redirectConsole) in C:\w\ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Unmanaged\UnmanagedUtils.cs:line 52
         at Apache.Ignite.Core.Ignition.Start(IgniteConfiguration cfg) in C:\w\ignite\modules\platforms\dotnet\Apache.Ignite.Core\Ignition.cs:line 271
      

        Attachments

          Activity

            People

            • Assignee:
              ptupitsyn Pavel Tupitsyn
              Reporter:
              ptupitsyn Pavel Tupitsyn
            • Votes:
              0 Vote for this issue
              Watchers:
              7 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 - 50m
                50m