Aleksey Plekhanov created IGNITE-10680:
------------------------------------------

             Summary: Add the ability to use started kernel context in 
standalone WAL iterator
                 Key: IGNITE-10680
                 URL: https://issues.apache.org/jira/browse/IGNITE-10680
             Project: Ignite
          Issue Type: Improvement
    Affects Versions: 2.7
            Reporter: Aleksey Plekhanov
            Assignee: Aleksey Plekhanov
             Fix For: 2.8


In the current implementation it's only possible to use fake kernel context in 
standalone WAL iterator. If we need to use binary meta from the running Ignite 
node we must specify binary meta directory in parameters of standalone WAL 
iterator factory. But there is a possible race with binary meta files 
read/write since binary meta received with {{MetadataUpdateProposedMessage}} 
can be written to the file and concurrently read from the same file at the same 
time. This can lead to assertions like the following:

{noformat}
java.lang.AssertionError
        at 
org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:305)
        at 
org.apache.ignite.internal.binary.BinaryMarshaller.unmarshal0(BinaryMarshaller.java:121)
        at 
org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:94)
        at 
org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:10103)
        at 
org.apache.ignite.internal.processors.cache.binary.BinaryMetadataFileStore.restoreMetadata(BinaryMetadataFileStore.java:117)
        at 
org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.start(CacheObjectBinaryProcessorImpl.java:251)
        at 
org.apache.ignite.internal.processors.cache.persistence.wal.reader.StandaloneGridKernalContext.binaryProcessor(StandaloneGridKernalContext.java:180)
        at 
org.apache.ignite.internal.processors.cache.persistence.wal.reader.StandaloneGridKernalContext.<init>(StandaloneGridKernalContext.java:155)
        at 
org.apache.ignite.internal.processors.cache.persistence.wal.reader.IgniteWalIteratorFactory.prepareSharedCtx(IgniteWalIteratorFactory.java:359)
        at 
org.apache.ignite.internal.processors.cache.persistence.wal.reader.IgniteWalIteratorFactory.iterator(IgniteWalIteratorFactory.java:177)
{noformat}

To solve this we can use in standalone WAL iterator existing kernel context of 
the started node instead of creating new fake one.





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

Reply via email to