On Feb 14, 2013, at 0:30, Dawid Weiss <dawid.we...@gmail.com> wrote:

>> This one:
>>  lucene/core/src/test/org/apache/lucene/search/TestSort.java
> 
> Yeah, I figured by comparing the size of these three... So, to make it
> short -- every thread should get its own Random instance from a call
> to LuceneTestCase's
> 
>  public static Random random() {
>    return RandomizedContext.current().getRandom();
>  }
> 
> More specifically, the inside of this method returns per-thread Random
> instance. The first time a thread calls this method it initializes to
> the same (master) seed.
> 
> These are not super-easy things to rewrite, Andi. Don't know if you
> want to emulate the entire randomized testing infrastructure or just
> make it work consistently with one seed.

No, definitely not. As an alternative, I could jcc-wrap the test framework but 
that would defeat some of the purpose.

So, if each thread gets the same seed, then they should also get the same 
random values, right ?
I was generating "more random" values (no per thread generator) and producing 
per-thread field configurations that were incompatible with each other in the 
field cache. I've now worked around this by caching some key random choices and 
reusing them for all threads.

Andi..

> 
> Dawid

Reply via email to