You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Willnauer (JIRA)" <ji...@apache.org> on 2016/03/09 10:26:40 UTC
[jira] [Comment Edited] (LUCENE-7080) MockDirectoryWrapper relies
on HashSet iteration order
[ https://issues.apache.org/jira/browse/LUCENE-7080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15186829#comment-15186829 ]
Simon Willnauer edited comment on LUCENE-7080 at 3/9/16 9:26 AM:
-----------------------------------------------------------------
[~mariusneo], the lucene test framework uses randomized runner which takes care of the reproducibility of our PRNG. The framework / test uses a random seed to initialize the PRNG and that allows use to draw random number like this in a reproducible fashion. The problem here is that different JDKs can have different hashing schemes for the hash set and that causes different iteration order which in-turn breaks the reproducibility.
was (Author: simonw):
[~mariusneo] the lucene test framework uses randomized runner which takes care of the reproducibility of our PRNG. The framework / test uses a random seed to initialize the PRNG and that allows use to draw random number like this in a reproducible fashion. The problem here is that different JDKs can have different hashing schemes for the hash set and that causes different iteration order which in-turn breaks the reproducibility.
> MockDirectoryWrapper relies on HashSet iteration order
> ------------------------------------------------------
>
> Key: LUCENE-7080
> URL: https://issues.apache.org/jira/browse/LUCENE-7080
> Project: Lucene - Core
> Issue Type: Bug
> Components: general/test
> Affects Versions: 5.5, 6.0
> Reporter: Simon Willnauer
> Assignee: Simon Willnauer
>
> MDW relies on HashSet iteration order in
> {code}
> public synchronized void corruptFiles(Collection<String> files) throws IOException {
> // Must make a copy because we change the incoming unsyncedFiles
> // when we create temp files, delete, etc., below:
> for(String name : new ArrayList<>(files)) { // <<<<< this should be sorted
> int damage = randomState.nextInt(6);
> {code}
> this causes reproducibility issues when files get corrupted.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org