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 658EE1843D for ; Tue, 28 Jul 2015 18:00:18 +0000 (UTC) Received: (qmail 75028 invoked by uid 500); 28 Jul 2015 18:00:05 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 74961 invoked by uid 500); 28 Jul 2015 18:00:05 -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 74937 invoked by uid 99); 28 Jul 2015 18:00:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jul 2015 18:00:05 +0000 Date: Tue, 28 Jul 2015 18:00:05 +0000 (UTC) From: "Ariel Weisberg (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CASSANDRA-9865) Broken vint encoding, at least when interacting with OHCProvider 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-9865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14644763#comment-14644763 ] Ariel Weisberg edited comment on CASSANDRA-9865 at 7/28/15 5:59 PM: -------------------------------------------------------------------- Yes it's still a problem. I think the issue is ByteOrder related. The vint code we have doesn't check to see if the byte order of the buffer is big endian. We could * assert the buffer is in the right order * Throw a runtime exception if the order is wrong * change the order of the buffer on enter/exit for vint read/write * Do the byte swapping ourselves depending on the order of the buffer (this has risk of using the order inconsistently) was (Author: aweisberg): Yes it's still a problem. I think the issue is ByteOrder related. The vint code we have doesn't check to see if the byte order of the buffer is big endian. We could * assert the buffer is in the right order * Throw a runtime exception if the order is wrong * change the order of the buffer on enter/exit for vint read/write * Do the byte swapping ourselves depending on the order of the buffer > Broken vint encoding, at least when interacting with OHCProvider > ---------------------------------------------------------------- > > Key: CASSANDRA-9865 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9865 > Project: Cassandra > Issue Type: Bug > Reporter: Sylvain Lebresne > Assignee: Ariel Weisberg > Fix For: 3.0 alpha 1 > > Attachments: 9865-hacky-test.txt > > > I haven't investigated this very closely so I only have a slightly hacky way to show the problem, but if you apply the patch attached, you'll see that the vints serialized and the one deserialized are not the same ones. If you remove the use of vints (as is currently on trunk, but only due to this issue because we do want to use vints), everything works correctly. > I'm honestly not sure where the problem is, but it sounds like it could be either in {{NIODataInputStream}} or in the {{OHCProvider}} since it's used on that test. -- This message was sent by Atlassian JIRA (v6.3.4#6332)