You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Yifan Cai (Jira)" <ji...@apache.org> on 2022/06/30 01:05:00 UTC

[jira] [Comment Edited] (CASSANDRA-17695) Fix AbstractCell#toString throws MarshalException for cell in collection

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

Yifan Cai edited comment on CASSANDRA-17695 at 6/30/22 1:04 AM:
----------------------------------------------------------------

Starting commit

CI Results:
||Branch||Source||Circle CI||
|cassandra-4.1|[branch|https://github.com/yifan-c/cassandra/tree/commit_remote_branch/CASSANDRA-17695-cassandra-4.1-607FC054-BE7C-499B-BDB5-A9E4DABCC8AE]|[build|https://app.circleci.com/pipelines/github/yifan-c/cassandra?branch=commit_remote_branch%2FCASSANDRA-17695-cassandra-4.1-607FC054-BE7C-499B-BDB5-A9E4DABCC8AE]|
|trunk|[branch|https://github.com/yifan-c/cassandra/tree/commit_remote_branch/CASSANDRA-17695-trunk-607FC054-BE7C-499B-BDB5-A9E4DABCC8AE]|[build|https://app.circleci.com/pipelines/github/yifan-c/cassandra?branch=commit_remote_branch%2FCASSANDRA-17695-trunk-607FC054-BE7C-499B-BDB5-A9E4DABCC8AE]|

Test failures does not look related and they have tracking JIRAs.


was (Author: yifanc):
Starting commit

CI Results (pending):
||Branch||Source||Circle CI||
|cassandra-4.1|[branch|https://github.com/yifan-c/cassandra/tree/commit_remote_branch/CASSANDRA-17695-cassandra-4.1-607FC054-BE7C-499B-BDB5-A9E4DABCC8AE]|[build|https://app.circleci.com/pipelines/github/yifan-c/cassandra?branch=commit_remote_branch%2FCASSANDRA-17695-cassandra-4.1-607FC054-BE7C-499B-BDB5-A9E4DABCC8AE]|
|trunk|[branch|https://github.com/yifan-c/cassandra/tree/commit_remote_branch/CASSANDRA-17695-trunk-607FC054-BE7C-499B-BDB5-A9E4DABCC8AE]|[build|https://app.circleci.com/pipelines/github/yifan-c/cassandra?branch=commit_remote_branch%2FCASSANDRA-17695-trunk-607FC054-BE7C-499B-BDB5-A9E4DABCC8AE]|

> Fix AbstractCell#toString throws MarshalException for cell in collection
> ------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17695
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17695
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Legacy/Core
>            Reporter: Yifan Cai
>            Assignee: Francisco Guerrero
>            Priority: Normal
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> AbstractCell#toString is broken when calling on some cells in multi-cell collections.
> With the following types are unmarshallable: [date, duration, smallint, time, tinyint].
> The test to discover the unmarshallable types is
> {code:java}
> @Test
> public void testUnmarshallableInMulticellCollection()
> {
>     List<CQL3Type.Native> unmarshallableTypes = new ArrayList<>();
>     for (CQL3Type.Native nativeType : CQL3Type.Native.values())
>     {
>         ColumnMetadata c = fakeColumn("c", MapType.getInstance(Int32Type.instance, nativeType.getType(), true));
>         BufferCell cell = BufferCell.tombstone(c, 0, 4, CellPath.create(ByteBufferUtil.bytes(4)));
>         try
>         {
>             cell.toString();
>         }
>         catch (MarshalException m)
>         {
>             unmarshallableTypes.add(nativeType);
>         }
>     }
>     System.out.println("Unmarshallable types: " + unmarshallableTypes);
> }
> {code}
> At the first sight, the error is caused by trying to deserialize the values of the tombstone cells. The values are empty, hence the failure.



--
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