[ https://issues.apache.org/jira/browse/IGNITE-21656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Steshin updated IGNITE-21656: -------------------------------------- Description: Ignite fails to create dump of cache with a node filter. If there is no partitions on some cone, we assign the empty sat an the snapshot task result: {code:java} if (parts.isEmpty() && !withMetaStorage) task0 = new GridFinishedFuture<>(Collections.emptySet()); else { ... } {code} Cache dump doesn't contain the metastoreage. Further, we may cast the result to {code:java} SnapshotFutureTaskResult res = (SnapshotFutureTaskResult)task0.result(); {code} but it is a {code:java} Collections#EMPTY_SET {code} Stacktrace: {code:java} [ERROR][snapshot-runner-#413%dump.IgniteCacheDumpSelfTest0%][IgniteTestResources] Critical system error detected. Will be handled accordingly to configured handler [hnd=NoOpFailureHandler [super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=CRITICAL_ERROR, err=java.lang.ClassCastException: class java.util.Collections$EmptySet cannot be cast to class o.a.i.i.processors.cache.persistence.snapshot.SnapshotFutureTaskResult (java.util.Collections$EmptySet is in module java.base of loader 'bootstrap'; o.a.i.i.processors.cache.persistence.snapshot.SnapshotFutureTaskResult is in unnamed module of loader 'app')]] java.lang.ClassCastException: class java.util.Collections$EmptySet cannot be cast to class org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotFutureTaskResult (java.util.Collections$EmptySet is in module java.base of loader 'bootstrap'; org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotFutureTaskResult is in unnamed module of loader 'app') at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.lambda$initLocalFullSnapshot$923db49$1(IgniteSnapshotManager.java:1221) ~[classes/:?] at org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$d8c8d23e$1(GridFinishedFuture.java:180) ~[classes/:?] at org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$0(GridFinishedFuture.java:163) ~[classes/:?] {code} Even we fix this, we fail further at: {code:java} private GridKernalContext standaloneKernalContext(File dumpDir, IgniteLogger log) { File binaryMeta = CacheObjectBinaryProcessorImpl.binaryWorkDir(dumpDir.getAbsolutePath(), F.first(metadata).folderName()); File marshaller = new File(dumpDir, DFLT_MARSHALLER_PATH); A.ensure(binaryMeta.exists(), "binary metadata directory not exists"); {code} If cache with node filter was created by a client or not by the excluded node (or may be not from the coordinator), it is empty. CreateDumpFutureTask#start() is not called. Stacktrace: {code:java} Caused by: class org.apache.ignite.IgniteException: Ouch! Argument is invalid: binary metadata directory not exists at org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler.checkDumpFiles(SnapshotPartitionsVerifyHandler.java:382) at org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler.invoke(SnapshotPartitionsVerifyHandler.java:183) at org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsQuickVerifyHandler.invoke(SnapshotPartitionsQuickVerifyHandler.java:62) at org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsQuickVerifyHandler.invoke(SnapshotPartitionsQuickVerifyHandler.java:37) at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager$SnapshotHandlers.invoke(IgniteSnapshotManager.java:3396) at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager$SnapshotHandlers.lambda$invokeAll$8d56ceed$1(IgniteSnapshotManager.java:3328) at org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:11715) at org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:11617) at org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:11597) at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager$SnapshotHandlers.invokeAll(IgniteSnapshotManager.java:3325) at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.lambda$initLocalFullSnapshot$923db49$1(IgniteSnapshotManager.java:1254) at org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$d8c8d23e$1(GridFinishedFuture.java:180) at org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$0(GridFinishedFuture.java:163) ... 3 more Caused by: java.lang.IllegalArgumentException: Ouch! Argument is invalid: binary metadata directory not exists at org.apache.ignite.internal.util.GridArgumentCheck.ensure(GridArgumentCheck.java:110) at org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.Dump.standaloneKernalContext(Dump.java:169) at org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.Dump.<init>(Dump.java:149) at org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler.checkDumpFiles(SnapshotPartitionsVerifyHandler.java:370) ... 15 more {code} was: Ignite fails to create dump of cache with a node filter. If there is no partitions on some cone, we assign the empty sat an the snapshot task result: {code:java} if (parts.isEmpty() && !withMetaStorage) task0 = new GridFinishedFuture<>(Collections.emptySet()); else { ... } {code} Cache dump doesn't contain the metastoreage. Further, we may cast the result to {code:java} SnapshotFutureTaskResult res = (SnapshotFutureTaskResult)task0.result(); {code} but it is a {code:java} Collections#EMPTY_SET {code} Stacktrace: {code:java} [ERROR][snapshot-runner-#413%dump.IgniteCacheDumpSelfTest0%][IgniteTestResources] Critical system error detected. Will be handled accordingly to configured handler [hnd=NoOpFailureHandler [super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=CRITICAL_ERROR, err=java.lang.ClassCastException: class java.util.Collections$EmptySet cannot be cast to class o.a.i.i.processors.cache.persistence.snapshot.SnapshotFutureTaskResult (java.util.Collections$EmptySet is in module java.base of loader 'bootstrap'; o.a.i.i.processors.cache.persistence.snapshot.SnapshotFutureTaskResult is in unnamed module of loader 'app')]] java.lang.ClassCastException: class java.util.Collections$EmptySet cannot be cast to class org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotFutureTaskResult (java.util.Collections$EmptySet is in module java.base of loader 'bootstrap'; org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotFutureTaskResult is in unnamed module of loader 'app') at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.lambda$initLocalFullSnapshot$923db49$1(IgniteSnapshotManager.java:1221) ~[classes/:?] at org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$d8c8d23e$1(GridFinishedFuture.java:180) ~[classes/:?] at org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$0(GridFinishedFuture.java:163) ~[classes/:?] {code} Even we fix this, we fail further at: {code:java} private GridKernalContext standaloneKernalContext(File dumpDir, IgniteLogger log) { File binaryMeta = CacheObjectBinaryProcessorImpl.binaryWorkDir(dumpDir.getAbsolutePath(), F.first(metadata).folderName()); File marshaller = new File(dumpDir, DFLT_MARSHALLER_PATH); A.ensure(binaryMeta.exists(), "binary metadata directory not exists"); {code} If cache with node filter was created from client or not from filtered node (or not from coordinator), it is empty. CreateDumpFutureTask#start() is not called. Stacktrace: {code:java} Caused by: class org.apache.ignite.IgniteException: Ouch! Argument is invalid: binary metadata directory not exists at org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler.checkDumpFiles(SnapshotPartitionsVerifyHandler.java:382) at org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler.invoke(SnapshotPartitionsVerifyHandler.java:183) at org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsQuickVerifyHandler.invoke(SnapshotPartitionsQuickVerifyHandler.java:62) at org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsQuickVerifyHandler.invoke(SnapshotPartitionsQuickVerifyHandler.java:37) at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager$SnapshotHandlers.invoke(IgniteSnapshotManager.java:3396) at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager$SnapshotHandlers.lambda$invokeAll$8d56ceed$1(IgniteSnapshotManager.java:3328) at org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:11715) at org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:11617) at org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:11597) at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager$SnapshotHandlers.invokeAll(IgniteSnapshotManager.java:3325) at org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.lambda$initLocalFullSnapshot$923db49$1(IgniteSnapshotManager.java:1254) at org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$d8c8d23e$1(GridFinishedFuture.java:180) at org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$0(GridFinishedFuture.java:163) ... 3 more Caused by: java.lang.IllegalArgumentException: Ouch! Argument is invalid: binary metadata directory not exists at org.apache.ignite.internal.util.GridArgumentCheck.ensure(GridArgumentCheck.java:110) at org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.Dump.standaloneKernalContext(Dump.java:169) at org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.Dump.<init>(Dump.java:149) at org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler.checkDumpFiles(SnapshotPartitionsVerifyHandler.java:370) ... 15 more {code} > Cache dump fails on a cache with a node filter. > ----------------------------------------------- > > Key: IGNITE-21656 > URL: https://issues.apache.org/jira/browse/IGNITE-21656 > Project: Ignite > Issue Type: Bug > Reporter: Vladimir Steshin > Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > Ignite fails to create dump of cache with a node filter. If there is no > partitions on some cone, we assign the empty sat an the snapshot task result: > {code:java} > if (parts.isEmpty() && !withMetaStorage) > task0 = new GridFinishedFuture<>(Collections.emptySet()); > else { > ... > } > {code} > Cache dump doesn't contain the metastoreage. Further, we may cast the result > to > {code:java} > SnapshotFutureTaskResult res = (SnapshotFutureTaskResult)task0.result(); > {code} > but it is a > {code:java} > Collections#EMPTY_SET > {code} > Stacktrace: > {code:java} > [ERROR][snapshot-runner-#413%dump.IgniteCacheDumpSelfTest0%][IgniteTestResources] > Critical system error detected. Will be handled accordingly to configured > handler [hnd=NoOpFailureHandler [super=AbstractFailureHandler > [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, > SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext > [type=CRITICAL_ERROR, err=java.lang.ClassCastException: class > java.util.Collections$EmptySet cannot be cast to class > o.a.i.i.processors.cache.persistence.snapshot.SnapshotFutureTaskResult > (java.util.Collections$EmptySet is in module java.base of loader 'bootstrap'; > o.a.i.i.processors.cache.persistence.snapshot.SnapshotFutureTaskResult is in > unnamed module of loader 'app')]] > java.lang.ClassCastException: class java.util.Collections$EmptySet cannot be > cast to class > org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotFutureTaskResult > (java.util.Collections$EmptySet is in module java.base of loader > 'bootstrap'; > org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotFutureTaskResult > is in unnamed module of loader 'app') > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.lambda$initLocalFullSnapshot$923db49$1(IgniteSnapshotManager.java:1221) > ~[classes/:?] > at > org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$d8c8d23e$1(GridFinishedFuture.java:180) > ~[classes/:?] > at > org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$0(GridFinishedFuture.java:163) > ~[classes/:?] > {code} > Even we fix this, we fail further at: > {code:java} > private GridKernalContext standaloneKernalContext(File dumpDir, IgniteLogger > log) { > File binaryMeta = > CacheObjectBinaryProcessorImpl.binaryWorkDir(dumpDir.getAbsolutePath(), > F.first(metadata).folderName()); > File marshaller = new File(dumpDir, DFLT_MARSHALLER_PATH); > A.ensure(binaryMeta.exists(), "binary metadata directory not exists"); > {code} > If cache with node filter was created by a client or not by the excluded node > (or may be not from the coordinator), it is empty. > CreateDumpFutureTask#start() is not called. > Stacktrace: > {code:java} > Caused by: class org.apache.ignite.IgniteException: Ouch! Argument is > invalid: binary metadata directory not exists > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler.checkDumpFiles(SnapshotPartitionsVerifyHandler.java:382) > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler.invoke(SnapshotPartitionsVerifyHandler.java:183) > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsQuickVerifyHandler.invoke(SnapshotPartitionsQuickVerifyHandler.java:62) > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsQuickVerifyHandler.invoke(SnapshotPartitionsQuickVerifyHandler.java:37) > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager$SnapshotHandlers.invoke(IgniteSnapshotManager.java:3396) > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager$SnapshotHandlers.lambda$invokeAll$8d56ceed$1(IgniteSnapshotManager.java:3328) > at > org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:11715) > at > org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:11617) > at > org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:11597) > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager$SnapshotHandlers.invokeAll(IgniteSnapshotManager.java:3325) > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.lambda$initLocalFullSnapshot$923db49$1(IgniteSnapshotManager.java:1254) > at > org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$d8c8d23e$1(GridFinishedFuture.java:180) > at > org.apache.ignite.internal.util.future.GridFinishedFuture.lambda$chain$0(GridFinishedFuture.java:163) > ... 3 more > Caused by: java.lang.IllegalArgumentException: Ouch! Argument is invalid: > binary metadata directory not exists > at > org.apache.ignite.internal.util.GridArgumentCheck.ensure(GridArgumentCheck.java:110) > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.Dump.standaloneKernalContext(Dump.java:169) > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.Dump.<init>(Dump.java:149) > at > org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler.checkDumpFiles(SnapshotPartitionsVerifyHandler.java:370) > ... 15 more > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)