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

Hoss Man updated SOLR-6179:
---------------------------

    Description: 
These messages are currently logged as WARNings, and should either be switched 
to INFO level (or made more sophisticated so that it can tell when solr is 
setup for managed resources but the data isn't available)...

{noformat}
2788 [coreLoadExecutor-5-thread-1] WARN  org.apache.solr.rest.ManagedResource  
– No stored data found for /rest/managed
2788 [coreLoadExecutor-5-thread-1] WARN  org.apache.solr.rest.ManagedResource  
– No registered observers for /rest/managed
{noformat}
    Environment: 




  was:
These messages are currently logged as WARNings, and should be switched to INFO 
level (or made more sophisticated so that it can tell when solr is setup for 
managed resources but the data isn't available)

{noformat}
2788 [coreLoadExecutor-5-thread-1] WARN  org.apache.solr.rest.ManagedResource  
– No stored data found for /rest/managed
2788 [coreLoadExecutor-5-thread-1] WARN  org.apache.solr.rest.ManagedResource  
– No registered observers for /rest/managed
{noformat}



        Summary: ManagedResource repeatedly logs warnings when not used  (was: 
ManagedResource should not log warnings if it's not used)

(fixed description - was in "enviornment" by mistake)

----

Part of the issue here is that "No stored data found for..." message is 
actually fairly important it most cases -- if you are actively using managed 
resources (for something like managed synonyms) this WARN log type message is 
the only thing that will help you catch a possible situation where the storage 
file got deleted out from under you inadvertantly.

This is really very similar to the way we currently log a warning on startup if 
there is not "index" directory -- it's an exceptional enough situation that we 
want to warn you about it so that you can find it in your logs later if things 
aren't working as you expect -- but as soon as we log that warning we continue 
with the assumption that it's expected and we should automatically create it 
for you

The right solution here is probably:

* Anytime ManageResource sees that no storage exists for something it's 
managing, it should immediately create an "empty" storage for it and log a WARN 
along the lines of "No stored data found for /rest/foo/bar/yak .... creating 
new empty storage"
** This will mean that as people upgrade from old versions of solr to new 
versions of solr, they get this WARN exactly once for /rest/managed as the new 
(empty file is created)
** If/when people add new managed analysis factories to their schema.xml, they 
will likewise get a WARN once as empty storage files are created (even if they 
restart several times before they PUT any stopwords/synonyms into these managed 
resources)
* In our example configs, just like we ship pre-populated 
{{_schema_analysis_stopwords_english.json}} and 
{{_schema_analysis_synonyms_english.json}} files, we should ship a 
"pre-populated" (ie: empty) {{_rest_managed.json}} file
** which would ensure that no new user, who starts fresh with the "current" 
example configs, ever sees a warning about "No stored data found for 
/rest/managed"

----

The "No registered observers for..." message seems like something that has no 
business being a WARN, and should be switched to DEBUG or INFO -- but i may 
just be missunderstanding the purpose of that message.

> ManagedResource repeatedly logs warnings when not used
> ------------------------------------------------------
>
>                 Key: SOLR-6179
>                 URL: https://issues.apache.org/jira/browse/SOLR-6179
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.8, 4.8.1
>         Environment: 
>            Reporter: Hoss Man
>            Assignee: Timothy Potter
>
> These messages are currently logged as WARNings, and should either be 
> switched to INFO level (or made more sophisticated so that it can tell when 
> solr is setup for managed resources but the data isn't available)...
> {noformat}
> 2788 [coreLoadExecutor-5-thread-1] WARN  org.apache.solr.rest.ManagedResource 
>  – No stored data found for /rest/managed
> 2788 [coreLoadExecutor-5-thread-1] WARN  org.apache.solr.rest.ManagedResource 
>  – No registered observers for /rest/managed
> {noformat}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to