lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3738) Be consistent about negative vInt/vLong
Date Mon, 02 Apr 2012 22:39:22 GMT


Robert Muir commented on LUCENE-3738:

Lets resolve the issue.

> Be consistent about negative vInt/vLong
> ---------------------------------------
>                 Key: LUCENE-3738
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Uwe Schindler
>            Priority: Blocker
>             Fix For: 3.6, 4.0
>         Attachments:, LUCENE-3738-improvement.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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message