You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/09/04 09:51:01 UTC

[jira] [Commented] (IGNITE-6252) Cassandra Cache Store Session does not retry if prepare statement failed

    [ https://issues.apache.org/jira/browse/IGNITE-6252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16152402#comment-16152402 ] 

ASF GitHub Bot commented on IGNITE-6252:
----------------------------------------

GitHub user sunnychanwork opened a pull request:

    https://github.com/apache/ignite/pull/2583

    IGNITE-6252 Cassandra Cache Store Session does not retry if statement…

    … failed
    
    This patch will check to ensure that we retry any prepare statement failure when we submit the async request to Cassandra

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sunnychanwork/ignite patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/2583.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2583
    
----
commit 37620be67fc9d882892964516c983efef1c34415
Author: sunnychanwork <su...@users.noreply.github.com>
Date:   2017-09-04T09:43:28Z

    IGNITE-6252 Cassandra Cache Store Session does not retry if statement failed
    
    This patch will check to ensure that we retry any prepare statement failure when we submit the async request to Cassandra

----


> Cassandra Cache Store Session does not retry if prepare statement failed
> ------------------------------------------------------------------------
>
>                 Key: IGNITE-6252
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6252
>             Project: Ignite
>          Issue Type: Bug
>          Components: cassandra
>    Affects Versions: 2.0, 2.1
>            Reporter: Sunny Chan
>
> During our testing, we have found that certain warning about prepared statement:
> 2017-08-31 11:27:19.479 org.apache.ignite.cache.store.cassandra.CassandraCacheStore flusher-0-#265%xxxx% WARN CassandraCacheStore - Prepared statement cluster error detected, refreshing Cassandra session
> com.datastax.driver.core.exceptions.InvalidQueryException: Tried to execute unknown prepared query : 0xc7647611fd755386ef63478ee7de577b. You may have used a PreparedStatement that was created with another Cluster instance.
> We notice that after this warning occurs some of the data didn't persist properly in cassandra cache. After further examining the Ignite's CassandraSessionImpl code in method execute(BatchExecutionAssistance,Iterable), we found that at around [line 283|https://github.com/apache/ignite/blob/86bd544a557663bce497134f7826be6b24d53330/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java#L283], if the prepare statement fails in the asnyc call, it will not retry the operation as the error is stored in [line 269|https://github.com/apache/ignite/blob/86bd544a557663bce497134f7826be6b24d53330/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java#L269] and cleared in [line 277|https://github.com/apache/ignite/blob/86bd544a557663bce497134f7826be6b24d53330/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java#L277] but it was not checked again after going through the [ResultSetFuture |https://github.com/apache/ignite/blob/86bd544a557663bce497134f7826be6b24d53330/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java#L307].
> I believe in line 307 you should check for error != null such that any failure will be retry. Also potentially in line 312 we will need to check isTableAbsenceError(error).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)