lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Commented] (LUCENE-5532) AutomatonQuery.hashCode is not thread safe
Date Mon, 17 Mar 2014 09:36:42 GMT


Uwe Schindler commented on LUCENE-5532:

+1 to the patch.

I am not sure about this, I did not get the latest test-framework updates: It looks to me
that the thread does not use a custom name or is the thread group inherited by the test framework?
I would also change the thread to simply {{}} on Exception in the thread.

> AutomatonQuery.hashCode is not thread safe
> ------------------------------------------
>                 Key: LUCENE-5532
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-5532.patch, LUCENE-5532.patch
> This hashCode is implemented based on  #states and #transitions.
> These methods use getNumberedStates() though, which may oversize itself during construction
and then "size down" when its done. But numberedStates is prematurely set (before its "ready"),
which can cause a hashCode call from another thread to see a corrupt state... causing things
like NPEs from null states and other strangeness. I don't think we should set this variable
until its "finished".

This message was sent by Atlassian JIRA

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

View raw message