Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-6252

Cassandra Cache Store Session does not retry if prepare statement failed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0, 2.1
    • 2.7
    • cassandra
    • None

    Description

      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, if the prepare statement fails in the asnyc call, it will not retry the operation as the error is stored in line 269 and cleared in line 277 but it was not checked again after going through the ResultSetFuture .

      I believe in line 307 you should check for error != null such that any failure will be retry.

      Attachments

        Issue Links

          Activity

            People

              irudyak Igor Rudyak
              sunnychanclsa Sunny Chan
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: