ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Kovalenko (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-10556) Attempt to decrypt data records during read-only metastorage recovery leads to NPE
Date Wed, 05 Dec 2018 15:33:00 GMT
Pavel Kovalenko created IGNITE-10556:
----------------------------------------

             Summary: Attempt to decrypt data records during read-only metastorage recovery
leads to NPE
                 Key: IGNITE-10556
                 URL: https://issues.apache.org/jira/browse/IGNITE-10556
             Project: Ignite
          Issue Type: Bug
          Components: cache
    Affects Versions: 2.8
            Reporter: Pavel Kovalenko
             Fix For: 2.8


Stacktrace:
{noformat}
Caused by: java.lang.NullPointerException
    at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager$RestoreStateContext.lambda$next$0(GridCacheDatabaseSharedManager.java:4795)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager$RestoreStateContext.next(GridCacheDatabaseSharedManager.java:4799)
    at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager$RestoreLogicalState.next(GridCacheDatabaseSharedManager.java:4926)
    at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.applyLogicalUpdates(GridCacheDatabaseSharedManager.java:2370)
    at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.readMetastore(GridCacheDatabaseSharedManager.java:733)
    at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.notifyMetaStorageSubscribersOnReadyForRead(GridCacheDatabaseSharedManager.java:4493)
    at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1048)
    ... 20 more
{noformat}

It happens because there is no encryption key for that cache group. Encryption keys are initialized
after read-only metastorage is ready. There is a bug in RestoreStateContext which tries to
filter out DataEntries in DataRecord by group id during read-only metastorage recovery. We
should explicitly skip such records before filtering. As a possible solution, we should provide
more flexible records filter to RestoreStateContext if we do recovery of read-only metastorage.

We should also return something more meaningful instead of null if no encryption key is found
for DataRecord, as it can be a silent problem for components iterating over WAL.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message