You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jason Gerlowski (JIRA)" <ji...@apache.org> on 2015/12/03 03:38:11 UTC

[jira] [Comment Edited] (SOLR-8359) Restrict child classes from using parent logger's state

    [ https://issues.apache.org/jira/browse/SOLR-8359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15037088#comment-15037088 ] 

Jason Gerlowski edited comment on SOLR-8359 at 12/3/15 2:37 AM:
----------------------------------------------------------------

Ah, I forgot to save in Eclipse before making the patch.  Find the updated version attached.

I see your point about the cached {{debug}} variables not getting refreshed ever.  {{UpdateLog.preSoftCommit()}} will update the cached value in the abstract parent, but won't affect the values in {{HdfsUpdateLog}} etc.

One way to fix this would be to implement a {{preSoftCommit()}} method in each of this children which resets the cached value in the child before calling {{super.preSoftCommit()}}.  Not sure if there's a better solution though.  It seems like there should be a better way to do this...


was (Author: gerlowskija):
Ah, I forgot to save in Eclipse before making the patch.  Find the updated version attached.

I see your point about the cached {{debug}} variables not getting refreshed ever.  {{UpdateLog.preSoftCommit()}} will update the cached value in the abstract parent, but won't affect the values in {{CdcrTransactionLog}} etc.

One way to fix this would be to implement a {{preSoftCommit()}} method in each of this children which resets the cached value in the child before calling {{super.preSoftCommit()}}.  Not sure if there's a better solution though.  It seems like there should be a better way to do this...

> Restrict child classes from using parent logger's state
> -------------------------------------------------------
>
>                 Key: SOLR-8359
>                 URL: https://issues.apache.org/jira/browse/SOLR-8359
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Mike Drob
>             Fix For: Trunk
>
>         Attachments: SOLR-8359.patch, SOLR-8359.patch
>
>
> In SOLR-8330 we split up a lot of loggers. However, there are a few classes that still use their parent's logging state and configuration indirectly.
> {{HdfsUpdateLog}} and {{HdfsTransactionLog}} both use their parent class cached read of {{boolean debug = log.isDebugEnabled()}}, when they should check their own loggers instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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