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

Test Failure: test_sstableofflinerelevel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • 5.x
    • CI, Test/dtest/python
    • None
    • Correctness
    • Normal
    • Normal
    • User Report
    • All
    • None

    Description

      self = <offline_tools_test.TestOfflineTools object at 0x7f2f106fc940>
      
          def test_sstableofflinerelevel(self):
              """
              Generate sstables of varying levels.
              Reset sstables to L0 with sstablelevelreset
              Run sstableofflinerelevel and ensure tables are promoted correctly
              Also test a variety of bad inputs including nonexistent keyspace and sstables
              @since 2.1.5
              @jira_ticket CASSANDRA-8031
              """
              cluster = self.cluster
              cluster.set_configuration_options(values={'compaction_throughput_mb_per_sec': 0})
              cluster.populate(1).start()
              node1 = cluster.nodelist()[0]
          
              # NOTE - As of now this does not return when it encounters Exception and causes test to hang, temporarily commented out
              # test by trying to run on nonexistent keyspace
              # cluster.stop(gently=False)
              # output, error, rc = node1.run_sstableofflinerelevel("keyspace1", "standard1", output=True)
              # assert "java.lang.IllegalArgumentException: Unknown keyspace/columnFamily keyspace1.standard1" in error
              # # this should return exit code 1
              # assert rc, 1 == msg=str(rc)
              # cluster.start()
          
              # now test by generating keyspace but not flushing sstables
          
              node1.stress(['write', 'n=1', 'no-warmup',
                            '-schema', 'replication(factor=1)',
                            '-col', 'n=FIXED(10)', 'SIZE=FIXED(1024)',
                            '-rate', 'threads=8'])
          
              cluster.stop(gently=False)
              try:
                  output, error, _ = node1.run_sstableofflinerelevel("keyspace1", "standard1")
              except ToolError as e:
                  assert re.search("No sstables to relevel for keyspace1.standard1", e.stdout)
                  assert e.exit_status == 1, str(e.exit_status)
          
              # test by flushing (sstable should be level 0)
              cluster.start()
              session = self.patient_cql_connection(node1)
              logger.debug("Altering compaction strategy to LCS")
      >       session.execute(
                  "ALTER TABLE keyspace1.standard1 with compaction={'class': 'LeveledCompactionStrategy', 'sstable_size_in_mb':1, 'enabled':'false'};")
      
      offline_tools_test.py:147: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      ../env3.8/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()
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      self = <ResponseFuture: query='<SimpleStatement query="ALTER TABLE keyspace1.standard1 with compaction={'class<span class="code-quote">': 'LeveledComp...9042': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042 coordinator_host=None>
      
          def result(self):
              """
              Return the final result or raise an Exception if errors were
              encountered.  If the final result or error has not been set
              yet, this method will block until it is set, or the timeout
              set for the request expires.
          
              Timeout is specified in the Session request execution functions.
              If the timeout is exceeded, an :exc:`cassandra.OperationTimedOut` will be raised.
              This is a client-side timeout. For more information
              about server-side coordinator timeouts, see :class:`.policies.RetryPolicy`.
          
              Example usage::
          
                  >>> future = session.execute_async("SELECT * FROM mycf")
                  >>> # do other stuff...
          
                  >>> try:
                  ...     rows = future.result()
                  ...     for row in rows:
                  ...         ... # process results
                  ... except Exception:
                  ...     log.exception("Operation failed:")
          
              """
              self._event.wait()
              if self._final_result is not _NOT_SET:
                  return ResultSet(self, self._final_result)
              else:
      >           raise self._final_exception
      E           cassandra.OperationTimedOut: errors={'127.0.0.1:9042': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1:9042
      
      ../env3.8/src/cassandra-driver/cassandra/cluster.py:4894: OperationTimedOut
      

      https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/2680/workflows/8b1c0d0a-7458-4b43-9bba-ac96b9bfe64f/jobs/58929/tests#failed-test-0
      https://ci-cassandra.apache.org/job/Cassandra-trunk/1859/#showFailuresLink

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              e.dimitrova Ekaterina Dimitrova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: