cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-11048) JSON queries are not thread safe
Date Sat, 06 Feb 2016 00:07:39 GMT

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

Tyler Hobbs commented on CASSANDRA-11048:
-----------------------------------------

[~sbtourist] I've pushed a set of branches with your suggested changes and a unit test, would
you mind reviewing?

Branches and pending CI runs:
|[CASSANDRA-11048|https://github.com/thobbs/cassandra/tree/CASSANDRA-11048]|[testall|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11048-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11048-dtest]|
|[CASSANDRA-11048-3.0|https://github.com/thobbs/cassandra/tree/CASSANDRA-11048-3.0]|[testall|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11048-3.0-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11048-3.0-dtest]|
|[CASSANDRA-11048-trunk|https://github.com/thobbs/cassandra/tree/CASSANDRA-11048-trunk]|[testall|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11048-trunk-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11048-trunk-dtest]|

> JSON queries are not thread safe
> --------------------------------
>
>                 Key: CASSANDRA-11048
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11048
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Sergio Bossa
>            Assignee: Tyler Hobbs
>            Priority: Critical
>              Labels: easyfix, newbie, patch
>         Attachments: 0001-Fix-thread-unsafe-usage-of-JsonStringEncoder-see-CAS.patch
>
>
> {{org.apache.cassandra.cql3.Json}} uses a shared instance of {{JsonStringEncoder}} which
is not thread safe (see 1), while {{JsonStringEncoder#getInstance()}} should be used (see
2).
> As a consequence, concurrent {{select JSON}} queries often produce wrong (sometimes unreadable)
results.
> 1. http://grepcode.com/file/repo1.maven.org/maven2/org.codehaus.jackson/jackson-core-asl/1.9.2/org/codehaus/jackson/io/JsonStringEncoder.java
> 2. http://grepcode.com/file/repo1.maven.org/maven2/org.codehaus.jackson/jackson-core-asl/1.9.2/org/codehaus/jackson/io/JsonStringEncoder.java#JsonStringEncoder.getInstance%28%29



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message