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

Pavel Pereslegin updated IGNITE-21873:
--------------------------------------
    Description: 
This looks like a degenerate case, but it may still be worth addressing the 
issue.

To reproduce this issue you need to set {{Commons.IN_BUFFER_SIZE = 1}}.
And execute DML query, for example:
{code:java}
sql("CREATE TABLE test(id INT PRIMARY KEY)");
sql("INSERT INTO test VALUES (0), (1) ");
{code}

Result:
{noformat}
Caused by: java.lang.AssertionError
        at 
org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.request(ModifyNode.java:130)
 ~[main/:?]
        at 
org.apache.ignite.internal.sql.engine.exec.rel.Outbox.flush(Outbox.java:326) 
~[main/:?]
        at 
org.apache.ignite.internal.sql.engine.exec.rel.Outbox.push(Outbox.java:166) 
~[main/:?]
        at 
org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.tryEnd(ModifyNode.java:206)
 ~[main/:?]
        at 
org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.lambda$flushTuples$1(ModifyNode.java:282)
 ~[main/:?]
        at 
org.apache.ignite.internal.sql.engine.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:325)
 ~[main/:?]
{noformat}

The problem can be solved by swapping the following lines in the 
{{ModifyNode#tryEnd}} method.
{code:java}
downstream().push(context().rowHandler().factory(MODIFY_RESULT).create(updatedRows));

requested = 0; // must come before the 'push()' call
{code}



  was:
This seems like a degenerate case, but it may still be worth addressing the 
issue.
To reproduce this issue you need to set {{Commons.IN_BUFFER_SIZE = 1}}.
And execute DML query, for example:
{code:java}
sql("CREATE TABLE test(id INT PRIMARY KEY)");
sql("INSERT INTO test VALUES (0), (1) ");
{code}

Result:
{noformat}
Caused by: java.lang.AssertionError
        at 
org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.request(ModifyNode.java:130)
 ~[main/:?]
        at 
org.apache.ignite.internal.sql.engine.exec.rel.Outbox.flush(Outbox.java:326) 
~[main/:?]
        at 
org.apache.ignite.internal.sql.engine.exec.rel.Outbox.push(Outbox.java:166) 
~[main/:?]
        at 
org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.tryEnd(ModifyNode.java:206)
 ~[main/:?]
        at 
org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.lambda$flushTuples$1(ModifyNode.java:282)
 ~[main/:?]
        at 
org.apache.ignite.internal.sql.engine.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:325)
 ~[main/:?]
{noformat}

The problem can be solved by swapping the following lines in the 
{{ModifyNode#tryEnd}} method.
{code:java}
downstream().push(context().rowHandler().factory(MODIFY_RESULT).create(updatedRows));

requested = 0; // must come before the 'push()' call
{code}




> Sql. The insertion fails if the execution node buffer size is set to 1
> ----------------------------------------------------------------------
>
>                 Key: IGNITE-21873
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21873
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Pavel Pereslegin
>            Priority: Minor
>              Labels: ignite-3
>
> This looks like a degenerate case, but it may still be worth addressing the 
> issue.
> To reproduce this issue you need to set {{Commons.IN_BUFFER_SIZE = 1}}.
> And execute DML query, for example:
> {code:java}
> sql("CREATE TABLE test(id INT PRIMARY KEY)");
> sql("INSERT INTO test VALUES (0), (1) ");
> {code}
> Result:
> {noformat}
> Caused by: java.lang.AssertionError
>       at 
> org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.request(ModifyNode.java:130)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.sql.engine.exec.rel.Outbox.flush(Outbox.java:326) 
> ~[main/:?]
>       at 
> org.apache.ignite.internal.sql.engine.exec.rel.Outbox.push(Outbox.java:166) 
> ~[main/:?]
>       at 
> org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.tryEnd(ModifyNode.java:206)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.lambda$flushTuples$1(ModifyNode.java:282)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.sql.engine.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:325)
>  ~[main/:?]
> {noformat}
> The problem can be solved by swapping the following lines in the 
> {{ModifyNode#tryEnd}} method.
> {code:java}
> downstream().push(context().rowHandler().factory(MODIFY_RESULT).create(updatedRows));
> requested = 0; // must come before the 'push()' call
> {code}



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

Reply via email to