[
https://issues.apache.org/jira/browse/IGNITE-15769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ilya Shishkov updated IGNITE-15769:
-----------------------------------
Description:
In case if complex key is used (i.e. custom class or composite primary key in
terms of SQL), when data is put into cache, below error occurs in
IgniteToIgniteCdcStreamer which streams data from updated datacenter:
{code}
[18:46:36,757][SEVERE][Thread-1][] Cdc error
class org.apache.ignite.IgniteException: Transaction has been rolled back:
5b8c25a7c71-00000000-0ea3-dad8-0000-000000000002
at
org.apache.ignite.cdc.IgniteToIgniteCdcStreamer.onEvents(IgniteToIgniteCdcStreamer.java:138)
at
org.apache.ignite.internal.cdc.WalRecordsConsumer.onRecords(WalRecordsConsumer.java:157)
at
org.apache.ignite.internal.cdc.CdcMain.consumeSegment(CdcMain.java:472)
at
java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at
java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:373)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390)
at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at
java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at
java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at
org.apache.ignite.internal.cdc.CdcMain.consumeWalSegmentsUntilStopped(CdcMain.java:403)
at org.apache.ignite.internal.cdc.CdcMain.runX(CdcMain.java:285)
at org.apache.ignite.internal.cdc.CdcMain.run(CdcMain.java:229)
at java.lang.Thread.run(Thread.java:748)
Caused by: class
org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException:
Transaction has been rolled back:
5b8c25a7c71-00000000-0ea3-dad8-0000-000000000002
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.syncOp(GridCacheAdapter.java:4385)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAllConflict(GridCacheAdapter.java:2606)
at
org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.putAllConflict(GridCacheProxyImpl.java:565)
at
org.apache.ignite.cdc.CdcEventsApplier.applyIf(CdcEventsApplier.java:151)
at
org.apache.ignite.cdc.CdcEventsApplier.apply(CdcEventsApplier.java:126)
at
org.apache.ignite.cdc.IgniteToIgniteCdcStreamer.onEvents(IgniteToIgniteCdcStreamer.java:119)
... 20 more
Caused by: class org.apache.ignite.IgniteCheckedException: Unexpected binary
object class [type=class
org.apache.ignite.internal.processors.cache.KeyCacheObjectImpl]
at
org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:128)
at
org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateProps(QueryTypeDescriptorImpl.java:615)
at
org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateKeyAndValue(QueryTypeDescriptorImpl.java:587)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.validateKeyAndValue(GridQueryProcessor.java:3685)
at
org.apache.ignite.internal.processors.cache.GridCacheContext.validateKeyAndValue(GridCacheContext.java:1883)
at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.enlistWriteEntry(GridNearTxLocal.java:1550)
at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.enlistWrite(GridNearTxLocal.java:1278)
at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAllAsync0(GridNearTxLocal.java:927)
at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAllDrAsync(GridNearTxLocal.java:553)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$23.inOp(GridCacheAdapter.java:2608)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$SyncInOp.op(GridCacheAdapter.java:5641)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.syncOp(GridCacheAdapter.java:4366)
... 25 more
{code}
Here is a problem reproducer (should be applied to master of
ignite-extensions): [^CdcFailureOnComplexKey.patch]
There are 3 test failures (total amount of test - 4):
# Cache create via DDL with not null fields in key.
# Cache create via DDL without not null-fields in key (stracktrace differs from
above failure).
# Cache create vie IgniteCache API + QueryEntity + index in key class
(QueryEntity#setIndexes).
One test does not fail: cache create via IgniteCache API + QueryEntity, but
without indexes in key.
In all failure cases below error is present in stack trace:
{code}
Caused by: class org.apache.ignite.IgniteCheckedException: Unexpected binary
object class [type=class
org.apache.ignite.internal.processors.cache.KeyCacheObjectImpl]
at
org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:128)
{code}
Logs of reproducer from IDE: [^CdcFailureOnComplexKey.html]
was:
In case if complex key is used (i.e. custom class or composite primary key in
terms of SQL), when data isto put in cache, below error occurs in
IgniteToIgniteCdcStreamer which streams data from updated datacenter:
{code}
[18:46:36,757][SEVERE][Thread-1][] Cdc error
class org.apache.ignite.IgniteException: Transaction has been rolled back:
5b8c25a7c71-00000000-0ea3-dad8-0000-000000000002
at
org.apache.ignite.cdc.IgniteToIgniteCdcStreamer.onEvents(IgniteToIgniteCdcStreamer.java:138)
at
org.apache.ignite.internal.cdc.WalRecordsConsumer.onRecords(WalRecordsConsumer.java:157)
at
org.apache.ignite.internal.cdc.CdcMain.consumeSegment(CdcMain.java:472)
at
java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at
java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:373)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390)
at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at
java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at
java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at
org.apache.ignite.internal.cdc.CdcMain.consumeWalSegmentsUntilStopped(CdcMain.java:403)
at org.apache.ignite.internal.cdc.CdcMain.runX(CdcMain.java:285)
at org.apache.ignite.internal.cdc.CdcMain.run(CdcMain.java:229)
at java.lang.Thread.run(Thread.java:748)
Caused by: class
org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException:
Transaction has been rolled back:
5b8c25a7c71-00000000-0ea3-dad8-0000-000000000002
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.syncOp(GridCacheAdapter.java:4385)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAllConflict(GridCacheAdapter.java:2606)
at
org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.putAllConflict(GridCacheProxyImpl.java:565)
at
org.apache.ignite.cdc.CdcEventsApplier.applyIf(CdcEventsApplier.java:151)
at
org.apache.ignite.cdc.CdcEventsApplier.apply(CdcEventsApplier.java:126)
at
org.apache.ignite.cdc.IgniteToIgniteCdcStreamer.onEvents(IgniteToIgniteCdcStreamer.java:119)
... 20 more
Caused by: class org.apache.ignite.IgniteCheckedException: Unexpected binary
object class [type=class
org.apache.ignite.internal.processors.cache.KeyCacheObjectImpl]
at
org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:128)
at
org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateProps(QueryTypeDescriptorImpl.java:615)
at
org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateKeyAndValue(QueryTypeDescriptorImpl.java:587)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.validateKeyAndValue(GridQueryProcessor.java:3685)
at
org.apache.ignite.internal.processors.cache.GridCacheContext.validateKeyAndValue(GridCacheContext.java:1883)
at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.enlistWriteEntry(GridNearTxLocal.java:1550)
at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.enlistWrite(GridNearTxLocal.java:1278)
at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAllAsync0(GridNearTxLocal.java:927)
at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAllDrAsync(GridNearTxLocal.java:553)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$23.inOp(GridCacheAdapter.java:2608)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$SyncInOp.op(GridCacheAdapter.java:5641)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.syncOp(GridCacheAdapter.java:4366)
... 25 more
{code}
Here is a problem reproducer (should be applied to master of
ignite-extensions): [^CdcFailureOnComplexKey.patch]
There are 3 test failures (total amount of test - 4):
# Cache create via DDL with not null fields in key.
# Cache create via DDL without not null-fields in key (stracktrace differs from
above failure).
# Cache create vie IgniteCache API + QueryEntity + index in key class
(QueryEntity#setIndexes).
One test does not fail: cache create via IgniteCache API + QueryEntity, but
without indexes in key.
In all failure cases below error is present in stack trace:
{code}
Caused by: class org.apache.ignite.IgniteCheckedException: Unexpected binary
object class [type=class
org.apache.ignite.internal.processors.cache.KeyCacheObjectImpl]
at
org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:128)
{code}
Logs of reproducer from IDE: [^CdcFailureOnComplexKey.html]
> IgniteToIgniteCdcStreamer fails on complex keys
> -----------------------------------------------
>
> Key: IGNITE-15769
> URL: https://issues.apache.org/jira/browse/IGNITE-15769
> Project: Ignite
> Issue Type: Bug
> Reporter: Ilya Shishkov
> Priority: Major
> Attachments: CdcFailureOnComplexKey.html, CdcFailureOnComplexKey.patch
>
>
> In case if complex key is used (i.e. custom class or composite primary key in
> terms of SQL), when data is put into cache, below error occurs in
> IgniteToIgniteCdcStreamer which streams data from updated datacenter:
> {code}
> [18:46:36,757][SEVERE][Thread-1][] Cdc error
> class org.apache.ignite.IgniteException: Transaction has been rolled back:
> 5b8c25a7c71-00000000-0ea3-dad8-0000-000000000002
> at
> org.apache.ignite.cdc.IgniteToIgniteCdcStreamer.onEvents(IgniteToIgniteCdcStreamer.java:138)
> at
> org.apache.ignite.internal.cdc.WalRecordsConsumer.onRecords(WalRecordsConsumer.java:157)
> at
> org.apache.ignite.internal.cdc.CdcMain.consumeSegment(CdcMain.java:472)
> at
> java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
> at
> java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:373)
> at java.util.ArrayList.forEach(ArrayList.java:1257)
> at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390)
> at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
> at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
> at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
> at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
> at
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
> at
> java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
> at
> java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
> at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
> at
> java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
> at
> org.apache.ignite.internal.cdc.CdcMain.consumeWalSegmentsUntilStopped(CdcMain.java:403)
> at org.apache.ignite.internal.cdc.CdcMain.runX(CdcMain.java:285)
> at org.apache.ignite.internal.cdc.CdcMain.run(CdcMain.java:229)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: class
> org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException:
> Transaction has been rolled back:
> 5b8c25a7c71-00000000-0ea3-dad8-0000-000000000002
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.syncOp(GridCacheAdapter.java:4385)
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAllConflict(GridCacheAdapter.java:2606)
> at
> org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.putAllConflict(GridCacheProxyImpl.java:565)
> at
> org.apache.ignite.cdc.CdcEventsApplier.applyIf(CdcEventsApplier.java:151)
> at
> org.apache.ignite.cdc.CdcEventsApplier.apply(CdcEventsApplier.java:126)
> at
> org.apache.ignite.cdc.IgniteToIgniteCdcStreamer.onEvents(IgniteToIgniteCdcStreamer.java:119)
> ... 20 more
> Caused by: class org.apache.ignite.IgniteCheckedException: Unexpected binary
> object class [type=class
> org.apache.ignite.internal.processors.cache.KeyCacheObjectImpl]
> at
> org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:128)
> at
> org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateProps(QueryTypeDescriptorImpl.java:615)
> at
> org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateKeyAndValue(QueryTypeDescriptorImpl.java:587)
> at
> org.apache.ignite.internal.processors.query.GridQueryProcessor.validateKeyAndValue(GridQueryProcessor.java:3685)
> at
> org.apache.ignite.internal.processors.cache.GridCacheContext.validateKeyAndValue(GridCacheContext.java:1883)
> at
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.enlistWriteEntry(GridNearTxLocal.java:1550)
> at
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.enlistWrite(GridNearTxLocal.java:1278)
> at
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAllAsync0(GridNearTxLocal.java:927)
> at
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAllDrAsync(GridNearTxLocal.java:553)
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter$23.inOp(GridCacheAdapter.java:2608)
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter$SyncInOp.op(GridCacheAdapter.java:5641)
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.syncOp(GridCacheAdapter.java:4366)
> ... 25 more
> {code}
> Here is a problem reproducer (should be applied to master of
> ignite-extensions): [^CdcFailureOnComplexKey.patch]
> There are 3 test failures (total amount of test - 4):
> # Cache create via DDL with not null fields in key.
> # Cache create via DDL without not null-fields in key (stracktrace differs
> from above failure).
> # Cache create vie IgniteCache API + QueryEntity + index in key class
> (QueryEntity#setIndexes).
> One test does not fail: cache create via IgniteCache API + QueryEntity, but
> without indexes in key.
> In all failure cases below error is present in stack trace:
> {code}
> Caused by: class org.apache.ignite.IgniteCheckedException: Unexpected binary
> object class [type=class
> org.apache.ignite.internal.processors.cache.KeyCacheObjectImpl]
> at
> org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:128)
> {code}
> Logs of reproducer from IDE: [^CdcFailureOnComplexKey.html]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)