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

Shalin Shekhar Mangar commented on SOLR-10756:
----------------------------------------------

I found only two usages of this method in the code base out of which one of 
them is in a test that is easily replaced with the more specific 
forceCollectionUpdate() method call. The other is in the main overseer loop and 
only invoked when there was an error processing a work item. Typically that 
happens either because of a BadVersionException (someone else updated the 
cluster state) or due to malformed update that cannot be applied.

Now, the BadVersionException can also tell us exactly what path returned the 
BadVersionException – so theoretically we can extract the collection name that 
was being updated and replace the updatedClusterState call with the more 
specific forceCollectionUpdate call. However, since our cluster state mutators 
can throw a variety of exceptions, we cannot be sure if they really need a 
fresh cluster state or if forcing update of a specific collection is fine.

We should replace the usage of this method in the test with 
forceUpdateCollection method anyway since that is simple enough.

As for the overseer we could go three ways here:
 # Audit all the mutator classes used by overseer and determine what exceptions 
need refreshed state and if they can be specialized to a single collection. 
Then, extract the specific collection from BadVersionException and other 
exceptions identified by the above step and use that to call 
forceUpdateCollection method instead of this deprecated method
 # Create a (private to Overseer) sub-class of ZkStateReader and move the 
updateClusterState method there. This will need many methods of ZkStateReader 
that are currently private to be made protected.
 # Live with it and do the last point that Hoss proposed in the description 
i.e. rename this method to something more dangerous sounding and mark 
lucene.internal

I think there is little upside to getting rid of this method so I'd recommend 
path 3 above.

> deal with (deprecated but still used) ZkStateReader.updateClusterState()
> ------------------------------------------------------------------------
>
>                 Key: SOLR-10756
>                 URL: https://issues.apache.org/jira/browse/SOLR-10756
>             Project: Solr
>          Issue Type: Task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Hoss Man
>            Priority: Blocker
>             Fix For: master (7.0)
>
>
> spinning off of SOLR-10755...
> * ZkStateReader
> ** deprecated updateClusterState() is Still used by Overseer
> *** is the Overseer usage a mistake? should Overseer be doing something else?
> ** no obviously easy way to refactor this method it into Overseer w/o making 
> several private ZkStateReader methods public
> ** if Overseer usage is "ok" perhaps we should just rename this method 
> something more dangerous sounding and mark lucene.internal ?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to