Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 406A118BC9 for ; Tue, 26 Jan 2016 20:14:40 +0000 (UTC) Received: (qmail 87608 invoked by uid 500); 26 Jan 2016 20:14:40 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 87573 invoked by uid 500); 26 Jan 2016 20:14:40 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 87553 invoked by uid 99); 26 Jan 2016 20:14:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2016 20:14:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DE2452C1F58 for ; Tue, 26 Jan 2016 20:14:39 +0000 (UTC) Date: Tue, 26 Jan 2016 20:14:39 +0000 (UTC) From: "Sergio Bossa (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-11048) JSON queries are not thread safe MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-11048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117895#comment-15117895 ] Sergio Bossa commented on CASSANDRA-11048: ------------------------------------------ [~henryman], the {{Json}} class can definitely be tested in isolation, no need for integration tests in this case. > 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 > 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)