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

Andrzej Bialecki  commented on SOLR-9928:
-----------------------------------------

bq. this factory tries to inject itself in an abnormal way, rather than 
counting on being configured
That's exactly the intent. The reason for this design is that I wanted 
consistency of adding the metrics monitoring no matter what implementation 
users provided, and I couldn't count on metrics being injected in every 
implementation (adding this functionality to base {{DirectoryFactory}} wouldn't 
do it, because users would be free to create non-instrumented {{Directory}} 
impls anyway).

So yes, it looks like we need to be consistent and unwrap this one level in 
every call that takes {{Directory}} as argument.

> MetricsDirectoryFactory::renameWithOverwrite incorrectly calls super
> --------------------------------------------------------------------
>
>                 Key: SOLR-9928
>                 URL: https://issues.apache.org/jira/browse/SOLR-9928
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: metrics
>    Affects Versions: master (7.0), 6.4
>            Reporter: Mike Drob
>            Assignee: Andrzej Bialecki 
>             Fix For: master (7.0), 6.4
>
>         Attachments: SOLR-9928.patch, SOLR-9928.patch
>
>
> MetricsDirectoryFactory::renameWithOverwrite should call the delegate instead 
> of super. Trivial patch forthcoming.



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

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

Reply via email to