[ 
https://issues.apache.org/jira/browse/CASSANDRA-15021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vinay Chella updated CASSANDRA-15021:
-------------------------------------
    Fix Version/s: 3.11.4
    Since Version: 3.11.0
           Status: Resolved  (was: Ready to Commit)

Thanks for the review Ariel Weisberg

Committed as 
[35b22f57a03ce9e14865e335b4eb30fc11645a5c|https://github.com/apache/cassandra-dtest/commit/35b22f57a03ce9e14865e335b4eb30fc11645a5c]
 to cassandra-dtest repo

> TestBootstrapAfterUpgrade.test_upgrade_with_range_tombstone_eoc_0 upgrade 
> test is failing with TypeError
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15021
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15021
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/dtest
>            Reporter: Vinay Chella
>            Assignee: Vinay Chella
>            Priority: Low
>              Labels: dtest, test, upgrade-dtest
>             Fix For: 3.11.4
>
>
> While running upgrade tests for 3.11.4 candidate I noticed that 
> {{upgrade_tests.storage_engine_upgrade_test.TestBootstrapAfterUpgrade.test_upgrade_with_range_tombstone_eoc_0}}
>  is failing with TypeError.
> Example run with error:
> {code:java}
> self = <upgrade_tests.storage_engine_upgrade_test.TestBootstrapAfterUpgrade 
> object at 0x7f8db9908240>
>     @since('3.0', max_version='3.99')
>     def test_upgrade_with_range_tombstone_eoc_0(self):
>         """
>             Check sstable upgrading when the sstable contains a range 
> tombstone with EOC=0.
>     
>             @jira_ticket CASSANDRA-12423
>             """
>         session = self._setup_cluster(cluster_options={'start_rpc': 'true'})
>     
>         session.execute("CREATE TABLE rt (id INT, c1 TEXT, c2 TEXT, v INT, 
> PRIMARY KEY (id, c1, c2)) "
>                         "with compact storage and compression = 
> {'sstable_compression': ''};")
>     
>         range_delete = {
>             i32(1): {
>                 'rt': [Mutation(deletion=Deletion(2470761440040513,
>                                                   
> predicate=SlicePredicate(slice_range=SliceRange(
> >                                                     start=composite('a', 
> > eoc='\x00'),
>                                                       finish=composite('asd', 
> eoc='\x00')))))]
>             }
>         }
> upgrade_tests/storage_engine_upgrade_test.py:434: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> item1 = b'a', item2 = None, eoc = '\x00'
>     def composite(item1, item2=None, eoc=b'\x00'):
>         if isinstance(item1, str):
>             item1 = utf8encode(item1)
>         if isinstance(item2, str):
>             item2 = utf8encode(item2)
>     
> >       packed = _i16(len(item1)) + item1 + eoc
> E       TypeError: can't concat str to bytes
> thrift_test.py:153: TypeError
> {code}
> This TypeError is from Python3 migration. Python 3's standard string type is 
> Unicode based, and Python 3 adds a dedicated bytes type, but critically, no 
> automatic coercion between bytes and unicode strings is provided - 
> [context|https://www.python.org/dev/peps/pep-0404/#strings-and-bytes]
> This change in python3 is leading to "TypeError: can't concat str to bytes" 
> while appending bytes to string.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to