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

Flaky upgrade_tests.cql_tests.TestCQLNodes2RF1_Upgrade_current_4_0_x_To_indev_trunk.test_noncomposite_static_cf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.1-alpha1, 4.1
    • CI
    • None

    Description

      dtest-upgrade.upgrade_tests.cql_tests TestCQLNodes2RF1_Upgrade_current_4_0_x_To_indev_trunk test_noncomposite_static_cf is flaky.

      Error Message
      cassandra.WriteFailure: Error from server: code=1500 [Replica(s) failed to execute write] message="Operation failed - received 1 responses and 1 failures: UNKNOWN from /127.0.0.1:7000" info={'consistency': 'ONE', 'required_responses': 1, 'received_responses': 1, 'failures': 1, 'error_code_map': {'127.0.0.1': '0x0000'}}
      Stacktrace
      self = <abc.TestCQLNodes2RF1_Upgrade_current_4_0_x_To_indev_trunk object at 0x7fc77ceb7d00>
      
          def test_noncomposite_static_cf(self):
              """ Test non-composite static CF syntax """
              cursor = self.prepare()
          
              # Create
              cursor.execute("""
                      CREATE TABLE users (
                          userid uuid PRIMARY KEY,
                          firstname ascii,
                          lastname ascii,
                          age int
                      ) WITH COMPACT STORAGE;
                  """)
          
              for is_upgraded, cursor in self.do_upgrade(cursor):
                  logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old"))
                  cursor.execute("TRUNCATE users")
          
                  # Inserts
                  cursor.execute("INSERT INTO users (userid, firstname, lastname, age) VALUES (550e8400-e29b-41d4-a716-446655440000, 'Frodo', 'Baggins', 32)")
                  cursor.execute("UPDATE users SET firstname = 'Samwise', lastname = 'Gamgee', age = 33 WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479")
          
                  # Queries
                  assert_one(cursor, "SELECT firstname, lastname FROM users WHERE userid = 550e8400-e29b-41d4-a716-446655440000", ['Frodo', 'Baggins'])
          
                  assert_one(cursor, "SELECT * FROM users WHERE userid = 550e8400-e29b-41d4-a716-446655440000",
                             [UUID('550e8400-e29b-41d4-a716-446655440000'), 32, 'Frodo', 'Baggins'])
                  # FIXME There appears to be some sort of problem with reusable cells
                  # when executing this query.  It's likely that CASSANDRA-9705 will
                  # fix this, but I'm not 100% sure.
                  assert_one(cursor, "SELECT * FROM users WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479",
                             [UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), 33, 'Samwise', 'Gamgee'])
                  assert_all(cursor, "SELECT * FROM users",
                             [[UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), 33, 'Samwise', 'Gamgee'],
                              [UUID('550e8400-e29b-41d4-a716-446655440000'), 32, 'Frodo', 'Baggins']])
          
                  # Test batch inserts
      >           cursor.execute("""
                          BEGIN BATCH
                              INSERT INTO users (userid, age) VALUES (550e8400-e29b-41d4-a716-446655440000, 36)
                              UPDATE users SET age = 37 WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479
                              DELETE firstname, lastname FROM users WHERE userid = 550e8400-e29b-41d4-a716-446655440000
                              DELETE firstname, lastname FROM users WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479
                          APPLY BATCH
                      """)
      
      upgrade_tests/cql_tests.py:157: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      ../venv/src/cassandra-driver/cassandra/cluster.py:2618: in execute
          return self.execute_async(query, parameters, trace, custom_payload, timeout, execution_profile, paging_state, host, execute_as).result()
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      

      Attachments

        Issue Links

          Activity

            People

              marcuse Marcus Eriksson
              smiklosovic Stefan Miklosovic
              Marcus Eriksson
              Benedict Elliott Smith
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m