lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3439) add checks/asserts if you search across a closed reader
Date Thu, 15 Sep 2011 21:07:09 GMT


Yonik Seeley commented on LUCENE-3439:

I think the open/closed checks should still be non-volatile.
While a volatile read on (current) x86 is a no-op, it still imposes a happens-before/after
restriction via the memory model and hence prevents optimizations across that volatile read.
 Volatile reads may not always be a no-op on x86 either (and they already aren't on other

Using a volatile also doesn't buy us much either - it's still best-effort (the close could
come after we have checked the volatile, but before we have done the read).  We have enough
volatile/synchronized reads in other places that a non-volatile check will suffice to catch
bugs (and we shouldn't penalize correct programs).

> add checks/asserts if you search across a closed reader
> -------------------------------------------------------
>                 Key: LUCENE-3439
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-3439_test.patch
> if you try to search across a closed reader (and/or searcher too),
> there are no checks, not even assertions statements.
> this results in crazy scary stacktraces deep inside places like FSTs/various term dictionary
implementations etc.
> In some situations, depending on codec, you wont even get an error (i'm sure its fun
when you try to retrieve the stored fields!)

This message is automatically generated by JIRA.
For more information on JIRA, see:


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

View raw message