patsonluk commented on code in PR #2607:
URL: https://github.com/apache/solr/pull/2607#discussion_r1698878150


##########
solr/core/src/java/org/apache/solr/core/CoreContainer.java:
##########
@@ -2056,7 +2056,7 @@ public void reload(String name, UUID coreId) {
         newCore = core.reload(coreConfig);
 
         DocCollection docCollection = null;
-        if (getZkController() != null) {
+        if (getZkController() != null && !newCore.isSynthetic()) {

Review Comment:
   Thank you for the suggestion @cpoerschke ! 😊  I don't quite know the 
preference in general in the Solr dev community - I worked in some teams that 
avoid `instanceof` whenever possible.
   
   I didn't ask for the full rationale behind that, my guess is probably due to 
the potential risk of missing future classes, which does not extend such target 
class yet inherit some similarity that fulfills the same condition. Having a 
`isXYZ` method could be slightly more flexible than forcing class hierarchy.
   
   Anyway, I'm pretty okay with either way - whatever fits better for Solr 
community standards. The obvious benefit of using `instanceof` in this case is 
to avoid the extra `isSynthetic` method. 💪🏼 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to