originally the if (true) did not exist.

problem is (apart from system crash: where it matters to any directory),
NRTCachingDirectory's sync() actually causes stuff to go to disk. otherwise
it might just be sitting in RAM.

however, then we added RateLimitingDirectory. so now you have possibility
of RateLimitingDirectory(NRTCaching(.... and other structures. So its not
easily possible to only sync sometimes without breaking things.

On Wed, May 8, 2013 at 2:16 PM, Shai Erera <ser...@gmail.com> wrote:

> Hi
>
> Look at this code from MDW.sync:
>
>     if (true || LuceneTestCase.rarely(randomState) || delegate instanceof
> NRTCachingDirectory) {
>       // don't wear out our hardware so much in tests.
>       delegate.sync(names);
>     }
>
> Is the 'if (true)' intentional or left there by mistake? The comment
> afterwards suggests it should not be there, but I wanted to confirm before
> I remove it.
>
> Shai
>

Reply via email to