You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Kirill Tkalenko (Jira)" <ji...@apache.org> on 2022/06/07 14:31:00 UTC

[jira] [Updated] (IGNITE-17128) PersistentPageMemoryStorageExample cannot be run twice

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

Kirill Tkalenko updated IGNITE-17128:
-------------------------------------
    Ignite Flags:   (was: Docs Required,Release Notes Required)

> PersistentPageMemoryStorageExample cannot be run twice
> ------------------------------------------------------
>
>                 Key: IGNITE-17128
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17128
>             Project: Ignite
>          Issue Type: Bug
>          Components: examples
>    Affects Versions: 3.0.0-alpha5
>            Reporter: Andrey Khitrin
>            Priority: Major
>
> {*}Issue{*}: example PersistentPageMemoryStorageExample cannot be run twice. At the first attempt it runs fine. But at the second attempt, it fails with the following exception:
> {code:java}
> Exception in thread "main" java.sql.SQLException: Exception while executing query INSERT INTO ACCOUNTS (ACCOUNT_ID, FIRST_NAME, LAST_NAME, BALANCE) values (?, ?, ?, ?). Error message: java.util.concurrent.CompletionException: class org.apache.ignite.lang.IgniteException: Failed to INSERT some keys because they are already in cache. [rows=[Row[1, John, Doe, 1000.0]]]
>     at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
>     at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
>     at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:932)
>     at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:907)
>     at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
>     at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
>     at org.apache.ignite.internal.sql.engine.exec.rel.AsyncRootNode.lambda$closeAsync$0(AsyncRootNode.java:194)
>     at java.base/java.util.concurrent.LinkedBlockingQueue.forEachFrom(LinkedBlockingQueue.java:1010)
>     at java.base/java.util.concurrent.LinkedBlockingQueue.forEach(LinkedBlockingQueue.java:979)
>     at org.apache.ignite.internal.sql.engine.exec.rel.AsyncRootNode.closeAsync(AsyncRootNode.java:194)
>     at org.apache.ignite.internal.sql.engine.exec.rel.AsyncRootNode.onError(AsyncRootNode.java:149)
>     at org.apache.ignite.internal.sql.engine.exec.rel.AbstractNode.onError(AbstractNode.java:157)
>     at org.apache.ignite.internal.sql.engine.exec.rel.AbstractNode.onError(AbstractNode.java:157)
>     at org.apache.ignite.internal.sql.engine.exec.rel.AbstractNode.onError(AbstractNode.java:157)
>     at org.apache.ignite.internal.sql.engine.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:298)
>     at org.apache.ignite.internal.sql.engine.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:78)
>     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>     at java.base/java.lang.Thread.run(Thread.java:829)
> Caused by: class org.apache.ignite.lang.IgniteException: Failed to INSERT some keys because they are already in cache. [rows=[Row[1, John, Doe, 1000.0]]]
>     at org.apache.ignite.internal.sql.engine.AsyncSqlCursorImpl.lambda$requestNextAsync$0(AsyncSqlCursorImpl.java:74)
>     at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930)
>     ... 16 more
> Caused by: class org.apache.ignite.lang.IgniteInternalException: Failed to INSERT some keys because they are already in cache. [rows=[Row[1, John, Doe, 1000.0]]]
>     at org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.conflictKeysException(ModifyNode.java:256)
>     at org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.flushTuples(ModifyNode.java:233)
>     at org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.tryEnd(ModifyNode.java:175)
>     at org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.end(ModifyNode.java:148)
>     at org.apache.ignite.internal.sql.engine.exec.rel.ProjectNode.end(ProjectNode.java:81)
>     at org.apache.ignite.internal.sql.engine.exec.rel.ScanNode.push(ScanNode.java:132)
>     at org.apache.ignite.internal.sql.engine.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:295)
>     ... 4 more    at org.apache.ignite.internal.jdbc.proto.IgniteQueryErrorCode.createJdbcSqlException(IgniteQueryErrorCode.java:57)
>     at org.apache.ignite.internal.jdbc.JdbcStatement.execute0(JdbcStatement.java:147)
>     at org.apache.ignite.internal.jdbc.JdbcPreparedStatement.executeWithArguments(JdbcPreparedStatement.java:657)
>     at org.apache.ignite.internal.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:136)
>     at org.apache.ignite.example.storage.PersistentPageMemoryStorageExample.main(PersistentPageMemoryStorageExample.java:105)Process finished with exit code 1
>  {code}
> This could be mitigated by re-creation of ignite working environment, but I'm not sure whether this behavior is desired.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)