[
https://issues.apache.org/jira/browse/LUCENE-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747564#action_12747564
]
Michael McCandless commented on LUCENE-1798:
--------------------------------------------
I think that may be over-designing things...
Ie, I'm thinking by far the most common use here is a user who can't
understand why their FieldCache memory has increased so much, and,
they want a simple & fast way to debug it.
If we switch to the InsanityMonitor API then they'll have to implement
a class w/ that interface and a chunk of code that does the for loop,
printing out details?
Is there any other use case besides "help me debug" that would merit a
programmatic API?
I suppose we could switch to InsanityMonitor but then provide a
PrintStreamInstanityMonitor impl... still seems kinda overkill though.
But I don't feel strongly. Do you want to take a crack at it?
I think what's important here is there's a one-line means for a user
who's having problems to "turn on FieldCache debugging" and see
juicy details when insanity increases.
I agree we could make LuceneTestCase.tearDown more robust if tap into
this, though the simple infoStream could also be used for that?
> FieldCacheSanityChecker called directly by FieldCache.get*
> ----------------------------------------------------------
>
> Key: LUCENE-1798
> URL: https://issues.apache.org/jira/browse/LUCENE-1798
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Search
> Reporter: Hoss Man
> Assignee: Michael McCandless
> Fix For: 2.9
>
> Attachments: LUCENE-1798.patch, LUCENE-1798.patch
>
>
> As suggested by McCandless in LUCENE-1749, we can make FieldCacheImpl a
> client of the FieldCacheSanityChecker and have it sanity check itself each
> time it creates a new cache entry, and log a warning if it thinks there is a
> problem. (although we'd probably only want to do this if the caller has set
> some sort of infoStream/warningStream type property on the FieldCache object.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]