You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Ekaterina Dimitrova (Jira)" <ji...@apache.org> on 2022/11/14 20:26:00 UTC

[jira] [Commented] (CASSANDRA-16861) Fix flaky test test_compression_cql_options

    [ https://issues.apache.org/jira/browse/CASSANDRA-16861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634035#comment-17634035 ] 

Ekaterina Dimitrova commented on CASSANDRA-16861:
-------------------------------------------------

This is flaky also on trunk. Popped up in [this run|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/2130/workflows/50f35fc1-12e6-4ffb-af2e-cc5791a51152/jobs/16650/tests#failed-test-0] today.
{code:java}
AssertionError: assert 'DEFLATE' == 'UNKNOWN'
  - DEFLATE
  + UNKNOWN
self = <compression_test.TestCompression object at 0x7f2dd7ef3940>

    @since("3.0")
    def test_compression_cql_options(self):
        """
            @jira_ticket CASSANDRA-8384
            using new cql create table syntax to configure compression
            """
        cluster = self.cluster
        cluster.populate(1).start()
        [node] = cluster.nodelist()
    
        session = self.patient_cql_connection(node)
        create_ks(session, 'ks', 1)
        session.execute("""
                create table compression_opts_table
                    (id uuid PRIMARY KEY )
                    WITH compression = {
                        'class': 'DeflateCompressor',
                        'chunk_length_in_kb': 256
                    }
                    AND crc_check_chance = 0.25;
                """)
    
        session.cluster.refresh_schema_metadata()
        meta = session.cluster.metadata.keyspaces['ks'].tables['compression_opts_table']
        assert 'org.apache.cassandra.io.compress.DeflateCompressor' == meta.options['compression']['class']
        assert '256' == meta.options['compression']['chunk_length_in_kb']
        assert_crc_check_chance_equal(session, "compression_opts_table", 0.25)
    
        warn = node.grep_log("The option crc_check_chance was deprecated as a compression option.")
        assert len(warn) == 0
        session.execute("""
                alter table compression_opts_table
                    WITH compression = {
                        'class': 'DeflateCompressor',
                        'chunk_length_in_kb': 256,
                        'crc_check_chance': 0.6
                    }
                """)
        warn = node.grep_log("The option crc_check_chance was deprecated as a compression option.")
        assert len(warn) == 1
    
        # check metadata again after crc_check_chance_update
        session.cluster.refresh_schema_metadata()
        meta = session.cluster.metadata.keyspaces['ks'].tables['compression_opts_table']
        assert 'org.apache.cassandra.io.compress.DeflateCompressor' == meta.options['compression']['class']
        assert '256' == meta.options['compression']['chunk_length_in_kb']
        assert_crc_check_chance_equal(session, "compression_opts_table", 0.6)
    
        for n in range(0, 100):
            session.execute("insert into compression_opts_table (id) values (uuid());")
    
        self.flush('compression_opts_table')
        # Due to CASSANDRA-15379 we have to compact to get the actual table
        # compression to take effect since deflate is a slow compressor
        self.perform_node_tool_cmd(cmd='compact', table='compression_opts_table', indexes=list())
        sstables = self.get_sstables(table='compression_opts_table', indexes=list())
        sstable_paths = self.get_table_paths('compression_opts_table')
        found = False
        for sstable_path in sstable_paths:
            sstable = os.path.join(sstable_path, sstables['compression_opts_table'][1])
            if os.path.exists(sstable):
>               assert 'DEFLATE' == self._get_compression_type(sstable)
E               AssertionError: assert 'DEFLATE' == 'UNKNOWN'
E                 - DEFLATE
E                 + UNKNOWN

compression_test.py:116: AssertionError
{code}
 

 

 

> Fix flaky test test_compression_cql_options
> -------------------------------------------
>
>                 Key: CASSANDRA-16861
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16861
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CI
>            Reporter: Ekaterina Dimitrova
>            Priority: Normal
>             Fix For: 4.0, 4.x
>
>
> While working on another ticket, I saw test_compression_cql_options failing (which is not the case in Jenkins) but the Circle CI multiplexer showed it as being flaky:
> [https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1082/workflows/8dacef5d-46f4-4b59-a8f7-08824bf1180f/jobs/6407/tests#failed-test-0]
> {code:java}
>         sstables = self.get_sstables(table='compression_opts_table', indexes=list())
>         sstable_paths = self.get_table_paths('compression_opts_table')
>         found = False
>         for sstable_path in sstable_paths:
>             sstable = os.path.join(sstable_path, sstables['compression_opts_table'][1])
>             if os.path.exists(sstable):
>                 assert 'DEFLATE' == self._get_compression_type(sstable)
>                 found = True
> >       assert found
> E       assert False
> compression_test.py:118: AssertionError
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org