[ 
https://issues.apache.org/jira/browse/IGNITE-20397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Uttsel updated IGNITE-20397:
-----------------------------------
    Description: 
h3. Motivation
{code:java}
  java.lang.AssertionError: Group of the event is unsupported 
[nodeId=<11_part_18/isaat_n_2>, 
event=org.apache.ignite.raft.jraft.core.NodeImpl$LogEntryAndClosure@653d84a]
    at 
org.apache.ignite.raft.jraft.disruptor.StripedDisruptor$StripeEntryHandler.onEvent(StripedDisruptor.java:224)
 ~[ignite-raft-3.0.0-SNAPSHOT.jar:?]
    at 
org.apache.ignite.raft.jraft.disruptor.StripedDisruptor$StripeEntryHandler.onEvent(StripedDisruptor.java:191)
 ~[ignite-raft-3.0.0-SNAPSHOT.jar:?]
    at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:137) 
~[disruptor-3.3.7.jar:?]
    at java.lang.Thread.run(Thread.java:834) ~[?:?] {code}
[https://ci.ignite.apache.org/buildConfiguration/ApacheIgnite3xGradle_Test_RunAllTests/7498320?expandCode+Inspection=true&expandBuildProblemsSection=true&hideProblemsFromDependencies=false&expandBuildTestsSection=true&hideTestsFromDependencies=false&expandBuildChangesSection=true]

The root cause:
 # StripedDisruptor.StripeEntryHandler#onEvent method gets handler from 
StripedDisruptor.StripeEntryHandler#subscribers by event.nodeId().
 # In some cases the `subscribers` map is cleared by invocation of 
StripedDisruptor.StripeEntryHandler#unsubscribe (for example on table 
dropping), and then StripeEntryHandler receives event with 
SafeTimeSyncCommandImpl.
 # It produces an assertion error: `assert handler != null`

The issue is not caused by the catalog feature changes.

The issue is reproduced when I run the ItSqlAsynchronousApiTest#batchIncomplete 
with RepeatedTest annotation. In this case the cluster is not restarted after 
each tests. It possible to reproduced it frequently if add Thread.sleep in 
StripeEntryHandler#onEvent.
h3. Implementation notes

We decided that we can use LOG.warn() instead of an assert because it is safely 
to skip this event if the table was dropped.
{code:java}
if (handler != null) {
    handler.onEvent(event, sequence, endOfBatch || subscribers.size() > 1 && 
!supportsBatches);
} else {
    LOG.warn(format("Group of the event is unsupported [nodeId={}, event={}]", 
event.nodeId(), event));
} {code}
It is temp solution and we need to add TODO with link 
https://issues.apache.org/jira/browse/IGNITE-20536

*Definition of done*

There is no asserts if handler is null.

  was:
h3. Motivation
{code:java}
  java.lang.AssertionError: Group of the event is unsupported 
[nodeId=<11_part_18/isaat_n_2>, 
event=org.apache.ignite.raft.jraft.core.NodeImpl$LogEntryAndClosure@653d84a]
    at 
org.apache.ignite.raft.jraft.disruptor.StripedDisruptor$StripeEntryHandler.onEvent(StripedDisruptor.java:224)
 ~[ignite-raft-3.0.0-SNAPSHOT.jar:?]
    at 
org.apache.ignite.raft.jraft.disruptor.StripedDisruptor$StripeEntryHandler.onEvent(StripedDisruptor.java:191)
 ~[ignite-raft-3.0.0-SNAPSHOT.jar:?]
    at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:137) 
~[disruptor-3.3.7.jar:?]
    at java.lang.Thread.run(Thread.java:834) ~[?:?] {code}
[https://ci.ignite.apache.org/buildConfiguration/ApacheIgnite3xGradle_Test_RunAllTests/7498320?expandCode+Inspection=true&expandBuildProblemsSection=true&hideProblemsFromDependencies=false&expandBuildTestsSection=true&hideTestsFromDependencies=false&expandBuildChangesSection=true]

The root cause:
 # StripedDisruptor.StripeEntryHandler#onEvent method gets handler from 
StripedDisruptor.StripeEntryHandler#subscribers by event.nodeId().
 # In some cases the `subscribers` map is cleared by invocation of 
StripedDisruptor.StripeEntryHandler#unsubscribe (for example on table 
dropping), and then StripeEntryHandler receives event with 
SafeTimeSyncCommandImpl.
 # It produces an assertion error: `assert handler != null`

The issue is not caused by the catalog feature changes.

The issue is reproduced when I run the ItSqlAsynchronousApiTest#batchIncomplete 
with RepeatedTest annotation. In this case the cluster is not restarted after 
each tests. It possible to reproduced it frequently if add Thread.sleep in 
StripeEntryHandler#onEvent.
h3. Implementation notes

We decided that we can use LOG.warn() instead of an assert because it is safely 
to skip this event if the table was dropped.
{code:java}
if (handler != null) {
    handler.onEvent(event, sequence, endOfBatch || subscribers.size() > 1 && 
!supportsBatches);
} else {
    LOG.warn(format("Group of the event is unsupported [nodeId={}, event={}]", 
event.nodeId(), event));
} {code}
*Definition of done*

There is no asserts if handler is null.


> java.lang.AssertionError: Group of the event is unsupported
> -----------------------------------------------------------
>
>                 Key: IGNITE-20397
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20397
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Alexander Lapin
>            Priority: Major
>              Labels: ignite-3
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> h3. Motivation
> {code:java}
>   java.lang.AssertionError: Group of the event is unsupported 
> [nodeId=<11_part_18/isaat_n_2>, 
> event=org.apache.ignite.raft.jraft.core.NodeImpl$LogEntryAndClosure@653d84a]
>     at 
> org.apache.ignite.raft.jraft.disruptor.StripedDisruptor$StripeEntryHandler.onEvent(StripedDisruptor.java:224)
>  ~[ignite-raft-3.0.0-SNAPSHOT.jar:?]
>     at 
> org.apache.ignite.raft.jraft.disruptor.StripedDisruptor$StripeEntryHandler.onEvent(StripedDisruptor.java:191)
>  ~[ignite-raft-3.0.0-SNAPSHOT.jar:?]
>     at 
> com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:137) 
> ~[disruptor-3.3.7.jar:?]
>     at java.lang.Thread.run(Thread.java:834) ~[?:?] {code}
> [https://ci.ignite.apache.org/buildConfiguration/ApacheIgnite3xGradle_Test_RunAllTests/7498320?expandCode+Inspection=true&expandBuildProblemsSection=true&hideProblemsFromDependencies=false&expandBuildTestsSection=true&hideTestsFromDependencies=false&expandBuildChangesSection=true]
> The root cause:
>  # StripedDisruptor.StripeEntryHandler#onEvent method gets handler from 
> StripedDisruptor.StripeEntryHandler#subscribers by event.nodeId().
>  # In some cases the `subscribers` map is cleared by invocation of 
> StripedDisruptor.StripeEntryHandler#unsubscribe (for example on table 
> dropping), and then StripeEntryHandler receives event with 
> SafeTimeSyncCommandImpl.
>  # It produces an assertion error: `assert handler != null`
> The issue is not caused by the catalog feature changes.
> The issue is reproduced when I run the 
> ItSqlAsynchronousApiTest#batchIncomplete with RepeatedTest annotation. In 
> this case the cluster is not restarted after each tests. It possible to 
> reproduced it frequently if add Thread.sleep in StripeEntryHandler#onEvent.
> h3. Implementation notes
> We decided that we can use LOG.warn() instead of an assert because it is 
> safely to skip this event if the table was dropped.
> {code:java}
> if (handler != null) {
>     handler.onEvent(event, sequence, endOfBatch || subscribers.size() > 1 && 
> !supportsBatches);
> } else {
>     LOG.warn(format("Group of the event is unsupported [nodeId={}, 
> event={}]", event.nodeId(), event));
> } {code}
> It is temp solution and we need to add TODO with link 
> https://issues.apache.org/jira/browse/IGNITE-20536
> *Definition of done*
> There is no asserts if handler is null.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to