[ https://issues.apache.org/jira/browse/CASSANDRA-14752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17521404#comment-17521404 ]
Ekaterina Dimitrova edited comment on CASSANDRA-14752 at 4/13/22 1:37 AM: -------------------------------------------------------------------------- So I reran the upgrade tests with 3.11 in CircleCI without the patch. - https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1533/workflows/118fff4b-1d4f-4fd6-8b2d-c33dd8f76bde/jobs/9933/tests The only two tests that failed with my patch and I don't see in the list of failures without are: upgrade_tests.cql_tests.TestCQLNodes2RF1_Upgrade_indev_3_11_x_To_indev_trunk - I found it in Butler, trunk (https://ci-cassandra.apache.org/job/Cassandra-trunk/1076/testReport/dtest-upgrade.upgrade_tests.cql_tests/TestCQLNodes2RF1_Upgrade_indev_3_0_x_To_indev_trunk/test_noncomposite_static_cf/) test_noncomposite_static_cf - found it again on trunk... https://ci-cassandra.apache.org/job/Cassandra-trunk/1076/testReport/dtest-upgrade.upgrade_tests.cql_tests/cls/test_noncomposite_static_cf/ So to conclude, I see the same failures, except two which for some reason in Butler appear under trunk and not 3.11... I am not sure why I see what I see... I got +1 on the patch on green CI from [~blerer] in Slack. I consider all failures known and I will open a ticket to align how we run the upgrade tests in Circle and in Jenkins to ensure we don't miss anything... I will wait until tomorrow to commit the patch as there is some Jenkins issue and I see the last runs marked in red. Infra is checking. was (Author: e.dimitrova): So I reran the upgrade tests with 3.11 in CircleCI without the patch. - https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1533/workflows/118fff4b-1d4f-4fd6-8b2d-c33dd8f76bde/jobs/9933/tests The only two tests I don't see in the list of failures are: upgrade_tests.cql_tests.TestCQLNodes2RF1_Upgrade_indev_3_11_x_To_indev_trunk - I found it in Butler, trunk (https://ci-cassandra.apache.org/job/Cassandra-trunk/1076/testReport/dtest-upgrade.upgrade_tests.cql_tests/TestCQLNodes2RF1_Upgrade_indev_3_0_x_To_indev_trunk/test_noncomposite_static_cf/) test_noncomposite_static_cf - found it again on trunk... https://ci-cassandra.apache.org/job/Cassandra-trunk/1076/testReport/dtest-upgrade.upgrade_tests.cql_tests/cls/test_noncomposite_static_cf/ So to conclude, I see the same failures, except two which for some reason in Butler appear under trunk and not 3.11... I am not sure why I see what I see... I got +1 on the patch on green CI from [~blerer] in Slack. I consider all failures known and I will open a ticket to align how we run the upgrade tests in Circle and in Jenkins to ensure we don't miss anything... I will wait until tomorrow to commit the patch as there is some Jenkins issue and I see the last runs marked in red. Infra is checking. > serializers/BooleanSerializer.java is using static bytebuffers which may > cause problem for subsequent operations > ---------------------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-14752 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14752 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Core > Reporter: Varun Barala > Assignee: Ekaterina Dimitrova > Priority: Normal > Fix For: 3.11.x, 4.0.x, 4.x > > Attachments: patch, patch-modified > > > [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/serializers/BooleanSerializer.java#L26] > It has two static Bytebuffer variables:- > {code:java} > private static final ByteBuffer TRUE = ByteBuffer.wrap(new byte[]{1}); > private static final ByteBuffer FALSE = ByteBuffer.wrap(new byte[]{0});{code} > What will happen if the position of these Bytebuffers is being changed by > some other operations? It'll affect other subsequent operations. -IMO Using > static is not a good idea here.- > A potential place where it can become problematic: > [https://github.com/apache/cassandra/blob/cassandra-2.1.13/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java#L243] > Since we are calling *`.remaining()`* It may give wrong results _i.e 0_ if > these Bytebuffers have been used previously. > Solution: > > [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/serializers/BooleanSerializer.java#L42] > Every time we return new bytebuffer object. Please do let me know If there > is a better way. I'd like to contribute. Thanks!! > {code:java} > public ByteBuffer serialize(Boolean value) > { > return (value == null) ? ByteBufferUtil.EMPTY_BYTE_BUFFER > : value ? ByteBuffer.wrap(new byte[] {1}) : ByteBuffer.wrap(new byte[] {0}); > // false > } > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org