[jira] [Commented] (SOLR-14492) many json.facet aggregations can throw ArrayIndexOutOfBoundsException when using DVHASH due to incorrect resize impl

2020-05-21 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17113684#comment-17113684
 ] 

ASF subversion and git services commented on SOLR-14492:


Commit 28209cb8b1fe2a4d8050e4877c4df2ad5d85509b in lucene-solr's branch 
refs/heads/SOLR-14461-fileupload from Chris M. Hostetter
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=28209cb ]

SOLR-14492: Fix ArrayIndexOutOfBoundsException in json.facet 'terms' when 
FacetFieldProcessorByHashDV is used with aggregations over multivalued numeric 
fields

SOLR-14477: Fix incorrect 'relatedness()' calculations in json.facet 'terms' 
when 'prefix' option is used


> many json.facet aggregations can throw ArrayIndexOutOfBoundsException when 
> using DVHASH due to incorrect resize impl
> 
>
> Key: SOLR-14492
> URL: https://issues.apache.org/jira/browse/SOLR-14492
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: Facet Module
>Reporter: Chris M. Hostetter
>Assignee: Chris M. Hostetter
>Priority: Major
> Fix For: 8.6
>
> Attachments: SOLR-14492.patch, SOLR-14492.patch
>
>
> It appears we have quite a few SlotAcc impls that don't properly implement 
> resize: they ask the {{Resizer}} to resize their arrays, but throw away the 
> result. (arrays can't be resized in place, the {{Resizer}} is designed to 
> return a new replacment map, initializing empty values and/or mapping old 
> indicies to new indicies)
> For many FacetFieldProcessors, this isn't (normally) a problem because they 
> create their Accs using a "max upper bound" on the possible number of slots 
> in advance -- and only use resize later to "shrink" the number of slots.
> But in the case of {{method:dvhash}} / FacetFieldProcessorByHashDV this 
> processor starts out using a number of slots based on the size of the base 
> DocSet (rounded up to the next power of 2) maxed out at 1024, and then 
> _grows_ the SlotAccs if it encounters more values then that.
> This means that if the "base" context of the term facet is significantly 
> smaller then the number of values in the docValues field being faceted on 
> (ie: multiValued fields), then these problematic SlotAccs won't grow properly 
> and you'll get ArrayIndexOutOfBoundsException



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-14492) many json.facet aggregations can throw ArrayIndexOutOfBoundsException when using DVHASH due to incorrect resize impl

2020-05-20 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17112549#comment-17112549
 ] 

ASF subversion and git services commented on SOLR-14492:


Commit 6755796ddf76bc25d61e6bb3988924ac8a0071ec in lucene-solr's branch 
refs/heads/branch_8x from Chris M. Hostetter
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=6755796 ]

SOLR-14492: Fix ArrayIndexOutOfBoundsException in json.facet 'terms' when 
FacetFieldProcessorByHashDV is used with aggregations over multivalued numeric 
fields

SOLR-14477: Fix incorrect 'relatedness()' calculations in json.facet 'terms' 
when 'prefix' option is used
(cherry picked from commit 28209cb8b1fe2a4d8050e4877c4df2ad5d85509b)


> many json.facet aggregations can throw ArrayIndexOutOfBoundsException when 
> using DVHASH due to incorrect resize impl
> 
>
> Key: SOLR-14492
> URL: https://issues.apache.org/jira/browse/SOLR-14492
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: Facet Module
>Reporter: Chris M. Hostetter
>Assignee: Chris M. Hostetter
>Priority: Major
> Attachments: SOLR-14492.patch, SOLR-14492.patch
>
>
> It appears we have quite a few SlotAcc impls that don't properly implement 
> resize: they ask the {{Resizer}} to resize their arrays, but throw away the 
> result. (arrays can't be resized in place, the {{Resizer}} is designed to 
> return a new replacment map, initializing empty values and/or mapping old 
> indicies to new indicies)
> For many FacetFieldProcessors, this isn't (normally) a problem because they 
> create their Accs using a "max upper bound" on the possible number of slots 
> in advance -- and only use resize later to "shrink" the number of slots.
> But in the case of {{method:dvhash}} / FacetFieldProcessorByHashDV this 
> processor starts out using a number of slots based on the size of the base 
> DocSet (rounded up to the next power of 2) maxed out at 1024, and then 
> _grows_ the SlotAccs if it encounters more values then that.
> This means that if the "base" context of the term facet is significantly 
> smaller then the number of values in the docValues field being faceted on 
> (ie: multiValued fields), then these problematic SlotAccs won't grow properly 
> and you'll get ArrayIndexOutOfBoundsException



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-14492) many json.facet aggregations can throw ArrayIndexOutOfBoundsException when using DVHASH due to incorrect resize impl

2020-05-20 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17112509#comment-17112509
 ] 

ASF subversion and git services commented on SOLR-14492:


Commit 28209cb8b1fe2a4d8050e4877c4df2ad5d85509b in lucene-solr's branch 
refs/heads/master from Chris M. Hostetter
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=28209cb ]

SOLR-14492: Fix ArrayIndexOutOfBoundsException in json.facet 'terms' when 
FacetFieldProcessorByHashDV is used with aggregations over multivalued numeric 
fields

SOLR-14477: Fix incorrect 'relatedness()' calculations in json.facet 'terms' 
when 'prefix' option is used


> many json.facet aggregations can throw ArrayIndexOutOfBoundsException when 
> using DVHASH due to incorrect resize impl
> 
>
> Key: SOLR-14492
> URL: https://issues.apache.org/jira/browse/SOLR-14492
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: Facet Module
>Reporter: Chris M. Hostetter
>Assignee: Chris M. Hostetter
>Priority: Major
> Attachments: SOLR-14492.patch, SOLR-14492.patch
>
>
> It appears we have quite a few SlotAcc impls that don't properly implement 
> resize: they ask the {{Resizer}} to resize their arrays, but throw away the 
> result. (arrays can't be resized in place, the {{Resizer}} is designed to 
> return a new replacment map, initializing empty values and/or mapping old 
> indicies to new indicies)
> For many FacetFieldProcessors, this isn't (normally) a problem because they 
> create their Accs using a "max upper bound" on the possible number of slots 
> in advance -- and only use resize later to "shrink" the number of slots.
> But in the case of {{method:dvhash}} / FacetFieldProcessorByHashDV this 
> processor starts out using a number of slots based on the size of the base 
> DocSet (rounded up to the next power of 2) maxed out at 1024, and then 
> _grows_ the SlotAccs if it encounters more values then that.
> This means that if the "base" context of the term facet is significantly 
> smaller then the number of values in the docValues field being faceted on 
> (ie: multiValued fields), then these problematic SlotAccs won't grow properly 
> and you'll get ArrayIndexOutOfBoundsException



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org