[jira] [Commented] (LUCENE-5813) Directory should implement Accountable

2014-07-17 Thread Uwe Schindler (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-5813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14065389#comment-14065389
 ] 

Uwe Schindler commented on LUCENE-5813:
---

I don't think Directory itsself should implement Accountable. In my opinion, 
just because *some* directories consume RAM, I don't think we should make all 
directories implement that.

For the issue mentioned in LUCENE-5812 I think the ramBytesUsed there should 
simply check with instanceof if the inner directory implements accountable and 
then add its size to itsself. Something thats not intended to be Accountable 
like a purely disk based dir, should not implement it. Because otherwise a 
NIOFSDirectory would need to return the size of its inner ByteBuffer caches or 
whatever.

-1 to make Directory itsself Accountable.

 Directory should implement Accountable
 --

 Key: LUCENE-5813
 URL: https://issues.apache.org/jira/browse/LUCENE-5813
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Fix For: 4.10

 Attachments: LUCENE-5813.patch


 Follow-up of LUCENE-5812.



--
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] [Commented] (LUCENE-5813) Directory should implement Accountable

2014-07-17 Thread Adrien Grand (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-5813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14065487#comment-14065487
 ] 

Adrien Grand commented on LUCENE-5813:
--

I don' t think using {{instanceof Accountable}} works in general to measure 
memory usage. That's what I initially wanted to do with doc id sets, but this 
doesn't work as soon as you start using wrappers since they hide what interface 
the wrapped class implements. So for example if your NRT dir wraps a 
RateLimitedDirectoryWrapper that wraps another directory that implements 
Accountable, you would miss it.

If we don't want of Accountable on Directory, I would rather revert LUCENE-5812 
to make clear that it only reports memory usage for the cache?

 Directory should implement Accountable
 --

 Key: LUCENE-5813
 URL: https://issues.apache.org/jira/browse/LUCENE-5813
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Fix For: 4.10

 Attachments: LUCENE-5813.patch


 Follow-up of LUCENE-5812.



--
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] [Commented] (LUCENE-5813) Directory should implement Accountable

2014-07-17 Thread Ryan Ernst (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-5813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14065741#comment-14065741
 ] 

Ryan Ernst commented on LUCENE-5813:


bq. In my opinion, just because some directories consume RAM, I don't think we 
should make all directories implement that.

Why can't any directories that don't consume RAM return 0 for 
{{ramBytesUsed()}}?

 Directory should implement Accountable
 --

 Key: LUCENE-5813
 URL: https://issues.apache.org/jira/browse/LUCENE-5813
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Fix For: 4.10

 Attachments: LUCENE-5813.patch


 Follow-up of LUCENE-5812.



--
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