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

Test Failure: dtest.snapshot_test.TestArchiveCommitlog.test_dont_archive_commitlog

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • 4.0.x
    • Test/dtest/python
    • None
    • Correctness - Test Failure
    • Normal
    • Normal
    • User Report
    • All
    • None

    Description

      https://ci-cassandra.apache.org/job/Cassandra-4.0/321/testReport/dtest.snapshot_test/TestArchiveCommitlog/test_dont_archive_commitlog/

      Failed 1 times in the last 30 runs. Flakiness: 3%, Stability: 96%
      Error Message
      AssertionError: It's been over a and we haven't written a new commitlog segment. Something is wrong.

      Stacktrace
      self = <snapshot_test.TestArchiveCommitlog object at 0x7feb0a001e80>
      
          def test_dont_archive_commitlog(self):
              """
                  Run the archive commitlog test, but forget to add the restore commands
                  """
      >       self.run_archive_commitlog(restore_point_in_time=False, restore_archived_commitlog=False)
      
      snapshot_test.py:253: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      snapshot_test.py:300: in run_archive_commitlog
          advance_to_next_cl_segment(
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      session = <cassandra.cluster.Session object at 0x7feb09f861c0>
      commitlog_dir = '/home/cassandra/cassandra/cassandra-dtest/tmp/dtest-1mc01m0r/test/node1/commitlogs'
      keyspace_name = 'ks', table_name = 'junk_table', timeout = 120
      
          def advance_to_next_cl_segment(session, commitlog_dir,
                                         keyspace_name='ks', table_name='junk_table',
                                         timeout=120):
              """
              This is a hack to work around problems like CASSANDRA-11811.
          
              The problem happens in commitlog-replaying tests, like the snapshot and CDC
              tests. If we replay the first commitlog that's created, we wind up
              replaying some mutations that initialize system tables, so this function
              advances the node to the next CL by filling up the first one.
              """
              session.execute(
                  'CREATE TABLE {ks}.{tab} ('
                  'a uuid PRIMARY KEY, b uuid, c uuid, d uuid, '
                  'e uuid, f uuid, g uuid, h uuid'
                  ')'.format(ks=keyspace_name, tab=table_name)
              )
              prepared_insert = session.prepare(
                  'INSERT INTO {ks}.{tab} '
                  '(a, b, c, d, e, f, g, h) '
                  'VALUES ('
                  'uuid(), uuid(), uuid(), uuid(), '
                  'uuid(), uuid(), uuid(), uuid()'
                  ')'.format(ks=keyspace_name, tab=table_name)
              )
          
              # record segments that we want to advance past
              initial_cl_files = _files_in(commitlog_dir)
          
              start = time.time()
              stop_time = start + timeout
              rate_limited_debug_logger = get_rate_limited_function(logger.debug, 5)
              logger.debug('attempting to write until we start writing to new CL segments: {}'.format(initial_cl_files))
          
              while _files_in(commitlog_dir) <= initial_cl_files:
                  elapsed = time.time() - start
                  rate_limited_debug_logger('  commitlog-advancing load step has lasted {s:.2f}s'.format(s=elapsed))
      >           assert (
                      time.time() <= stop_time), "It's been over a {s}s and we haven't written a new " + \
                      "commitlog segment. Something is wrong.".format(s=timeout)
      E           AssertionError: It's been over a {s}s and we haven't written a new commitlog segment. Something is wrong.
      
      tools/hacks.py:59: AssertionError
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            jmckenzie Josh McKenzie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: