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

Mano Kovacs commented on SOLR-11435:
------------------------------------

It would be important to understand what {{ZkController.checkStateInZk()}} does 
when {{legacyCloud=false}}. Considering {{legacyCloud=false}} means the true 
source of core-layout is ZK and ZK only, this method should prevents core to be 
initialized if that core is not assigned to that node. Now, I see 
[~varunthacker]'s patch as a hardening in the logic, meaning if the core was 
moved in ZK, it should not be loaded on the old node (deleting collection), or 
the other way, if the core is moved physically to another node, it should be 
represented in ZK as well (AAR). So either that assumption is correct and that 
fix is valid, or not correct, but then we need to clarify meaning of 
{{legacyCloud=false}} and how we want to ensure that.

I am not sure how this was affecting AAR, but I assume there are scenarios when 
the core is already being created but ZK does not reflect the new state of the 
core (with the new baseurl). If that is the case, I would not think relaxation 
of this {{ZkController.checkStateInZk()}} is the right solution. I think the 
hardening just made a bug to surface.

I am preparing the test for this soon.

> Replicas failed to be deleted can overwrite replicas of recreated collections
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-11435
>                 URL: https://issues.apache.org/jira/browse/SOLR-11435
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 7.0
>            Reporter: Mano Kovacs
>
> When a replica comes up that was deleted from ZK while it was gone, it can 
> replace replicas in ZK if the collection an core names are equal.
> Reproduction:
> # Create {{collection1}} with 1 shard, 2 replicas on {{node1}} and {{node2}}
> # Shut down {{node2}}
> # Delete {{collection1}}
> # Create {{collection1}} on {{node1}} and {{node3}}
> # Start {{node2}}
> Expected:
> {{node2}} will not initialize node as it is not assigned to in ZK 
> ({{legacyCloud=false}})
> Actual:
> {{node2}} will overwrite the {{baseurl}} in {{state.json}} for one of the 
> replicas as the {{coreNodeName}} and the collection name will match the core 
> it has.
> Note: SOLR-7248 introduced a {{baseurl}} comparison which was removed in 
> SOLR-10279.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to