You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Mashenkov (Jira)" <ji...@apache.org> on 2025/02/28 09:15:00 UTC

[jira] [Updated] (IGNITE-21873) Sql. The insertion fails if the execution node buffer size is set to 1

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

Andrey Mashenkov 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}


Also, we should check all other execution nodes, if they are fine with Commons.IN_BUFFER_SIZE = 1



  was:
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}




> 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}
> Also, we should check all other execution nodes, if they are fine with Commons.IN_BUFFER_SIZE = 1



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