Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-14981

Cassandra fires NoHostAvailable exception, but trigger receives update

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • None
    • None
    • None
    • cassandra 3.11.3

    • Normal

    Description

      Cluster

      I have cluster with three nodes, cluster is created via `docker-compose`.

      All nodes in the cluster have `UN` (up normal)  status, checked with `nodetool status`.

       

      Trigger

      Trigger receives event and produces `Kafka` record.

      All three nodes have same trigger.

       

      Table

      Here is my CQL query, `users` table replication factor is 2

      Consistency level is one

      ```

      CREATE KEYSPACE mytestdb WITH replication = { 'class':'SimpleStrategy', 'replication_factor':2 };
      USE mytestdb;

      CREATE TABLE IF NOT EXISTS users (
      id uuid,
      username text,
      phone text,
      lastname text,
      firstname text,
      PRIMARY KEY (id)
      );

      CREATE TRIGGER kafka_trigger ON users USING 'org.company.CassandraTrigger';

      ```

       

      Problem

      Everything worked fine so I wanted to check edge cases, I intentionally shut down 2 nodes, to check how `Cassandra` and trigger will perform.

      I started to make queries to single working node.

      Some inserts were processed correctly, but for some of them `NoHostAvailable` exception occurred, but trigger received this "failed" insert event and produced normal `Kafka` record

      The problem is - data was not saved to `Cassandra`, but trigger received update.

      Attachments

        1. Cassandra.png
          163 kB
          Timur Tibeyev
        2. Kafka consumer.png
          286 kB
          Timur Tibeyev

        Activity

          People

            Unassigned Unassigned
            timurtibeyev Timur Tibeyev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: