[
https://issues.apache.org/jira/browse/SOLR-1807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843356#action_12843356
]
Hoss Man commented on SOLR-1807:
--------------------------------
No all plugin APIs are created equal ... some like TokenizerFactories are
designed to be extended by lots of people, others werent' particularly well
thought out abstractions in the first place, and your milage may vary when
implementing them -- feel free to post doc patches/suggestions to help make
this more clear.
as to the specific problem...
Even if UpdateHandler had been an abstract class, at best we could have added a
version of {{forceOpenWriter()}} that just threw an UnsupportedOpException --
there's no "default" impl we could have provided that would have worked for any
possible UpdateHandler subclass people might have written.
The best conceivable solution we probably could have come up with at the time
would be to introduce a marker interface that UpdateHandlers could optionaly
implement containing the APIs needed to support replication, and make the
ReplicationHandler test the registered UpdateHandler on startup to see if it
implements that API, and if not then throw an error.
This type of solution could still be implemented today, in place of the
"instanceof DirectUpdateHandler2" ... particularly now that the code has been
vetted a little bit by users and we have a pretty good idea of what type of
functionality an UpdateHandler needs to support in order to play nice with
ReplicationHandler.
> UpdateHandler plugin is not fully supported
> -------------------------------------------
>
> Key: SOLR-1807
> URL: https://issues.apache.org/jira/browse/SOLR-1807
> Project: Solr
> Issue Type: Bug
> Components: update
> Affects Versions: 1.4
> Reporter: John Wang
>
> UpdateHandler is published as a supported Plugin, but code such as the
> following:
> if (core.getUpdateHandler() instanceof DirectUpdateHandler2) {
> ((DirectUpdateHandler2)
> core.getUpdateHandler()).forceOpenWriter();
> } else {
> LOG.warn("The update handler being used is not an instance or
> sub-class of DirectUpdateHandler2. " +
> "Replicate on Startup cannot work.");
> }
> suggest that it is really not fully supported.
> Must all implementations of UpdateHandler be subclasses of
> DirectUpdateHandler2 for it to work with replication?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.