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 45824953A for ; Tue, 27 Mar 2012 17:28:49 +0000 (UTC) Received: (qmail 91842 invoked by uid 500); 27 Mar 2012 17:28:47 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 91707 invoked by uid 500); 27 Mar 2012 17:28:47 -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 91600 invoked by uid 99); 27 Mar 2012 17:28:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2012 17:28:47 +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 17:28:46 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 98B5C3498E8 for ; Tue, 27 Mar 2012 17:28:26 +0000 (UTC) Date: Tue, 27 Mar 2012 17:28:26 +0000 (UTC) From: "Michael McCandless (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <1691463583.24251.1332869306626.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 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239667#comment-13239667 ] Michael McCandless commented on LUCENE-3738: -------------------------------------------- +1 to remove those asserts... let's see if this fixes the slowdown the nightly builds hit on 3/18: http://people.apache.org/~mikemccand/lucenebench/IntNRQ.html > 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: ByteArrayDataInput.java.patch, 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