[
https://issues.apache.org/jira/browse/SOLR-11449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16197205#comment-16197205
]
Andrzej Bialecki commented on SOLR-11449:
------------------------------------------
I also noticed another issue related to leader replicas - there's a section of
code in {{moveNormalReplica}} that ensures that we don't lose a shard leader
during move. There's no corresponding protection in {{moveHdfsReplica}}, which
means that moving a replica that is also a shard leader may potentially lead to
data loss (eg. when replicationFactor=1).
Also, there's no rollback strategy when {{moveHdfsReplica}} partially fails,
unlike in {{moveNormalReplica}} where the code simply skips deleting the
original replica - it seems that the code should attempt to restore the
original replica in this case? When RF=1 and such failure occurs then not
restoring the original replica means lost shard.
> MoveReplicaCmd mistakenly calls registerCollectionStateWatcher instead of
> unregisterCollectionStateWatcher
> ----------------------------------------------------------------------------------------------------------
>
> Key: SOLR-11449
> URL: https://issues.apache.org/jira/browse/SOLR-11449
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 7.0.1, 7.1, master (8.0)
> Reporter: Andrzej Bialecki
> Assignee: Andrzej Bialecki
>
> Probably got in as a copy & paste error:
> {code}
> --- a/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java
> +++ b/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java
> @@ -206,7 +206,7 @@ public class MoveReplicaCmd implements Cmd{
> log.warn(errorString);
> results.add("failure", errorString);
> if (watcher != null) { // unregister
> - ocmh.zkStateReader.registerCollectionStateWatcher(coll.getName(),
> watcher);
> + ocmh.zkStateReader.removeCollectionStateWatcher(coll.getName(),
> watcher);
> }
> return;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]