[
https://issues.apache.org/jira/browse/IGNITE-10680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16721435#comment-16721435
]
Aleksey Plekhanov commented on IGNITE-10680:
--------------------------------------------
{{[Inspections] Core}} failure is not related to this fix:
{noformat}
src/test/java/org/apache/ignite/internal/processors/cache/distributed
IgniteCacheAtomicNodeRestartTest.java (1)
[22]: Unused import import org.junit.Test;
{noformat}
> Add the ability to use existing 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
> Priority: Major
> 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)