[jira] [Updated] (LUCENE-5701) Move core closed listeners to AtomicReader

2014-05-23 Thread Adrien Grand (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-5701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrien Grand updated LUCENE-5701:
-

Attachment: LUCENE-5701.patch

Here is a patch:
 * add/removeCoreClosedListener is abstract on AtomicReader
 * SegmentReader keeps doing the same thing
 * FilterAtomicReader delegates the call
 * Composite implementations ({{ParallelAtomicReader}}, 
{{SlowCompositeReaderWrapper}}) and implementations that don't have a core 
({{MemoryIndexReader}}) call the listener upon closing.


 Move core closed listeners to AtomicReader
 --

 Key: LUCENE-5701
 URL: https://issues.apache.org/jira/browse/LUCENE-5701
 Project: Lucene - Core
  Issue Type: New Feature
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Fix For: 4.9, 5.0

 Attachments: LUCENE-5701.patch


 Core listeners are very helpful when managing per-segment caches (filters, 
 uninverted doc values, etc.) yet this API is only exposed on 
 {{SegmentReader}}. If you want to use it today, you need to do instanceof 
 checks, try to unwrap in case of a FilterAtomicReader and finally fall back 
 to a reader closed listener if every other attempt to get the underlying 
 SegmentReader failed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-5701) Move core closed listeners to AtomicReader

2014-05-23 Thread Adrien Grand (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-5701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrien Grand updated LUCENE-5701:
-

Attachment: LUCENE-5701.patch

 Move core closed listeners to AtomicReader
 --

 Key: LUCENE-5701
 URL: https://issues.apache.org/jira/browse/LUCENE-5701
 Project: Lucene - Core
  Issue Type: New Feature
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Fix For: 4.9, 5.0

 Attachments: LUCENE-5701.patch


 Core listeners are very helpful when managing per-segment caches (filters, 
 uninverted doc values, etc.) yet this API is only exposed on 
 {{SegmentReader}}. If you want to use it today, you need to do instanceof 
 checks, try to unwrap in case of a FilterAtomicReader and finally fall back 
 to a reader closed listener if every other attempt to get the underlying 
 SegmentReader failed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-5701) Move core closed listeners to AtomicReader

2014-05-23 Thread Adrien Grand (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-5701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrien Grand updated LUCENE-5701:
-

Attachment: (was: LUCENE-5701.patch)

 Move core closed listeners to AtomicReader
 --

 Key: LUCENE-5701
 URL: https://issues.apache.org/jira/browse/LUCENE-5701
 Project: Lucene - Core
  Issue Type: New Feature
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Fix For: 4.9, 5.0

 Attachments: LUCENE-5701.patch


 Core listeners are very helpful when managing per-segment caches (filters, 
 uninverted doc values, etc.) yet this API is only exposed on 
 {{SegmentReader}}. If you want to use it today, you need to do instanceof 
 checks, try to unwrap in case of a FilterAtomicReader and finally fall back 
 to a reader closed listener if every other attempt to get the underlying 
 SegmentReader failed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-5701) Move core closed listeners to AtomicReader

2014-05-23 Thread Adrien Grand (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-5701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrien Grand updated LUCENE-5701:
-

Attachment: LUCENE-5701.patch

Good catch, I had missed that SCRW didn't return this as a cache key. Here is a 
new patch, I made the {{IndexReader}} on which to apply the close listener 
explicit in {{addCoreClosedListenerAsReaderClosedListener}} and modified the 
test to make sure the listener is added to the wrapped reader.

 Move core closed listeners to AtomicReader
 --

 Key: LUCENE-5701
 URL: https://issues.apache.org/jira/browse/LUCENE-5701
 Project: Lucene - Core
  Issue Type: New Feature
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Fix For: 4.9, 5.0

 Attachments: LUCENE-5701.patch, LUCENE-5701.patch


 Core listeners are very helpful when managing per-segment caches (filters, 
 uninverted doc values, etc.) yet this API is only exposed on 
 {{SegmentReader}}. If you want to use it today, you need to do instanceof 
 checks, try to unwrap in case of a FilterAtomicReader and finally fall back 
 to a reader closed listener if every other attempt to get the underlying 
 SegmentReader failed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org