[ 
https://issues.apache.org/jira/browse/LUCENE-6292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14335669#comment-14335669
 ] 

Hoss Man commented on LUCENE-6292:
----------------------------------

bq. We already do this, this is not changed by the patch. That is why all this 
logic is in an 'else' block.

Bah ... sorry.  i saw "GOOD_FAST_HASH_SEED" already set by the sysprop, but 
didn't see it get used in the code you were modifiying ... didn't notice the 
second call to System.getProperty("tests.seed") there.

+1

> seed StringHelper better
> ------------------------
>
>                 Key: LUCENE-6292
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6292
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-6292.patch
>
>
> The current code is good, it avoids SecureRandom/blocking when we don't need 
> real security (just used for safety checks). 
> On the other hand it has some downsides: 
> * the sources of randomness here aren't the best, e.g. sysprops will be the 
> same when using automated deployment tools if the jvm is the same version, 
> installed in the same place, same user, etc. 
> * asking for a Properties of all the sysprops needs blanket read-write access 
> to all of them, which is inconvenient if you want to lock this down in tests 
> (which I do). Today this means you can't ban write access or lucene won't 
> work.
> I think we should use /dev/urandom when its available, its just practical and 
> exactly what we need. If its not available (e.g. windows) we can use the 
> current logic. If sysprops arent available we can just use another hashcode 
> instead and lucene can still be used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to