This is an automated email from the ASF dual-hosted git repository.
psalagnac pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 900e0724c6f SOLR-17972: Retry creation of ZK lock on connection loss.
(#3968)
900e0724c6f is described below
commit 900e0724c6fe6467490d3c1aae150bdd309f200c
Author: Pierre Salagnac <[email protected]>
AuthorDate: Mon Dec 29 10:54:35 2025 +0100
SOLR-17972: Retry creation of ZK lock on connection loss. (#3968)
This makes sure we don't skip creation of ZK distributed lock in case of a
transient connection loss. This fix is only for when Solr is running with no
overseer (distributed updates).
This change is for 9x branch only, as this parameter is now ignored in 10
with the move to Curator.
---
changelog/unreleased/SOLR-17972-distributed-lock-lead.yml | 7 +++++++
solr/core/src/java/org/apache/solr/cloud/ZkDistributedLock.java | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/changelog/unreleased/SOLR-17972-distributed-lock-lead.yml
b/changelog/unreleased/SOLR-17972-distributed-lock-lead.yml
new file mode 100644
index 00000000000..da5b8d7e514
--- /dev/null
+++ b/changelog/unreleased/SOLR-17972-distributed-lock-lead.yml
@@ -0,0 +1,7 @@
+title: Retry creation of ZK lock on transient connection loss.
+type: fixed
+authors:
+ - name: Pierre Salagnac
+links:
+ - name: SOLR-17972
+ url: https://issues.apache.org/jira/browse/SOLR-17972
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkDistributedLock.java
b/solr/core/src/java/org/apache/solr/cloud/ZkDistributedLock.java
index b9fedc5e076..a1603c98bb3 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkDistributedLock.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkDistributedLock.java
@@ -95,7 +95,7 @@ abstract class ZkDistributedLock implements DistributedLock {
+ lockNodePrefix,
null,
CreateMode.EPHEMERAL_SEQUENTIAL,
- false);
+ true);
sequence = getSequenceFromNodename(lockNode);
}