Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9FB8D91B6 for ; Tue, 27 Mar 2012 16:52:52 +0000 (UTC) Received: (qmail 57283 invoked by uid 500); 27 Mar 2012 16:52:51 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 57189 invoked by uid 500); 27 Mar 2012 16:52:51 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 57182 invoked by uid 99); 27 Mar 2012 16:52:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2012 16:52:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2012 16:52:48 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CAAF4349E3D for ; Tue, 27 Mar 2012 16:52:27 +0000 (UTC) Date: Tue, 27 Mar 2012 16:52:27 +0000 (UTC) From: "Uwe Schindler (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <915023270.24017.1332867147831.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <237944330.11600.1328017810147.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3738) Be consistent about negative vInt/vLong 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/LUCENE-3738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239621#comment-13239621 ] Uwe Schindler commented on LUCENE-3738: --------------------------------------- Yonik, the unrolling was added because of a recent Java 6 hotspot bug (who unrolled the loop itsself - but wrongly). The thing that Mike has seen was a strange thing that the already unrolled code (since 3.1) behaves different before/after a slight code change done in this issue. > Be consistent about negative vInt/vLong > --------------------------------------- > > Key: LUCENE-3738 > URL: https://issues.apache.org/jira/browse/LUCENE-3738 > Project: Lucene - Java > Issue Type: Bug > Reporter: Michael McCandless > Assignee: Uwe Schindler > Fix For: 3.6, 4.0 > > Attachments: LUCENE-3738.patch, LUCENE-3738.patch, LUCENE-3738.patch, LUCENE-3738.patch, LUCENE-3738.patch > > > Today, write/readVInt "allows" a negative int, in that it will encode and decode correctly, just horribly inefficiently (5 bytes). > However, read/writeVLong fails (trips an assert). > I'd prefer that both vInt/vLong trip an assert if you ever try to write a negative number... it's badly trappy today. But, unfortunately, we sometimes rely on this... had we had this assert in 'since the beginning' we could have avoided that. > So, if we can't add that assert in today, I think we should at least fix readVLong to handle negative longs... but then you quietly spend 9 bytes (even more trappy!). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org