You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Greg Miller (Jira)" <ji...@apache.org> on 2021/03/04 14:23:00 UTC
[jira] [Commented] (LUCENE-9822) Assert that ForUtil.BLOCK_SIZE can
be encoded in a single byte in PForUtil
[ https://issues.apache.org/jira/browse/LUCENE-9822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17295297#comment-17295297 ]
Greg Miller commented on LUCENE-9822:
-------------------------------------
I think this is just a one-liner in the PForUtil ctor. I'll attach a patch shortly.
> Assert that ForUtil.BLOCK_SIZE can be encoded in a single byte in PForUtil
> --------------------------------------------------------------------------
>
> Key: LUCENE-9822
> URL: https://issues.apache.org/jira/browse/LUCENE-9822
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/codecs
> Affects Versions: master (9.0)
> Reporter: Greg Miller
> Priority: Trivial
>
> PForUtil assumes that ForUtil.BLOCK_SIZE can be encoded in a single byte when generating "patch offsets". If this assumption doesn't hold, PForUtil will silently encode incorrect positions. While the BLOCK_SIZE isn't particularly configurable, it would be nice to assert this assumption early in PForUtil in the even that the BLOCK_SIZE changes in some future codec version.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org