diff --git a/modules/cells/src/main/java/dmg/cells/zookeeper/CellCuratorFramework.java b/modules/cells/src/main/java/dmg/cells/zookeeper/CellCuratorFramework.java index 0f3e4ec75f9..fa85c191562 100644 --- a/modules/cells/src/main/java/dmg/cells/zookeeper/CellCuratorFramework.java +++ b/modules/cells/src/main/java/dmg/cells/zookeeper/CellCuratorFramework.java @@ -1,6 +1,6 @@ /* dCache - http://www.dcache.org/ * - * Copyright (C) 2016 - 2024 Deutsches Elektronen-Synchrotron + * Copyright (C) 2016 - 2026 Deutsches Elektronen-Synchrotron * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -394,6 +394,11 @@ public SchemaSet getSchemaSet() { return inner.getSchemaSet(); } + @Override + public boolean compressionEnabled() { + return inner.compressionEnabled(); + } + @Override public CompletableFuture postSafeNotify(Object monitorHolder) { return inner.postSafeNotify(monitorHolder); @@ -550,6 +555,11 @@ public CreateBackgroundModeStatACLable compressed() { return new CreateBackgroundModeStatACLableDecorator(inner.compressed()); } + @Override + public CreateBackgroundModeStatACLable uncompressed() { + return new CreateBackgroundModeStatACLableDecorator(inner.uncompressed()); + } + @Override public CreateBuilder2 idempotent() { return inner.idempotent(); @@ -766,6 +776,11 @@ public GetDataWatchBackgroundStatable decompressed() { return new GetDataWatchBackgroundStatableDecorator(inner.decompressed()); } + @Override + public GetDataWatchBackgroundStatable undecompressed() { + return new GetDataWatchBackgroundStatableDecorator(inner.undecompressed()); + } + @Override public byte[] forPath(String path) throws Exception { return inner.forPath(path); @@ -842,6 +857,11 @@ public SetDataBackgroundVersionable compressed() { return new SetDataBackgroundVersionableDecorator(inner.compressed()); } + @Override + public SetDataBackgroundVersionable uncompressed() { + return new SetDataBackgroundVersionableDecorator(inner.uncompressed()); + } + @Override public Stat forPath(String path, byte[] data) throws Exception { return inner.forPath(path, data); @@ -1058,6 +1078,11 @@ public ACLCreateModePathAndBytesable compressed() { return new ACLCreateModePathAndBytesableDecorator<>(inner.compressed()); } + @Override + public ACLCreateModePathAndBytesable uncompressed() { + return new ACLCreateModePathAndBytesableDecorator<>(inner.uncompressed()); + } + @Override public ACLPathAndBytesable withMode(CreateMode mode) { return new ACLPathAndBytesableDecorator<>(inner.withMode(mode)); @@ -1118,6 +1143,11 @@ public VersionPathAndBytesable compressed() { return new VersionPathAndBytesableCuratorTransactionBridgeDecorator(inner.compressed()); } + @Override + public VersionPathAndBytesable uncompressed() { + return new VersionPathAndBytesableCuratorTransactionBridgeDecorator(inner.uncompressed()); + } + @Override public CuratorTransactionBridge forPath(String path, byte[] data) throws Exception { return new CuratorTransactionBridgeDecorator(inner.forPath(path, data)); diff --git a/modules/dcache/src/main/java/org/dcache/cells/HAServiceLeadershipManager.java b/modules/dcache/src/main/java/org/dcache/cells/HAServiceLeadershipManager.java index a25bb1676a0..ff2f4a17bec 100644 --- a/modules/dcache/src/main/java/org/dcache/cells/HAServiceLeadershipManager.java +++ b/modules/dcache/src/main/java/org/dcache/cells/HAServiceLeadershipManager.java @@ -1,7 +1,7 @@ /* * dCache - http://www.dcache.org/ * - * Copyright (C) 2020 - 2024 Deutsches Elektronen-Synchrotron + * Copyright (C) 2020 - 2026 Deutsches Elektronen-Synchrotron * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -35,6 +35,7 @@ import java.util.concurrent.Callable; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.leader.LeaderLatch; +import org.apache.curator.framework.recipes.leader.LeaderLatch.CloseMode; import org.apache.curator.framework.recipes.leader.LeaderLatchListener; import org.apache.curator.framework.recipes.leader.Participant; import org.apache.curator.utils.CloseableUtils; @@ -102,7 +103,7 @@ private void createZkLeadershipPath(String serviceName) { * Creates a ZooKeeper leader latch, attaches and starts a listener. */ private void initZkLeaderListener() { - zkLeaderLatch = new LeaderLatch(zkClient, zkLeaderPath, cellAddress.toString()); + zkLeaderLatch = new LeaderLatch(zkClient, zkLeaderPath, cellAddress.toString(), CloseMode.NOTIFY_LEADER); zkLeaderLatch.addListener(new CDCLeaderLatchListener(leadershipListener)); try { zkLeaderLatch.start(); @@ -118,7 +119,7 @@ public boolean hasLeadership() { private synchronized void releaseLeadership() { try { - zkLeaderLatch.close(LeaderLatch.CloseMode.NOTIFY_LEADER); + zkLeaderLatch.close(); } catch (Exception e) { Throwables.throwIfUnchecked(e); throw new RuntimeException(e); diff --git a/pom.xml b/pom.xml index a8f50fa4601..7016932d074 100644 --- a/pom.xml +++ b/pom.xml @@ -165,7 +165,7 @@ org.apache.curator curator-recipes - 5.7.0 + 5.9.0 org.slf4j