Skip to content

Commit

Permalink
Compact curator transactions in Announcer
Browse files Browse the repository at this point in the history
  • Loading branch information
GWphua committed Nov 26, 2024
1 parent 343950f commit cbea21a
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@

import com.google.common.annotations.VisibleForTesting;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.api.transaction.CuratorMultiTransaction;
import org.apache.curator.framework.api.transaction.CuratorOp;
import org.apache.curator.framework.recipes.cache.CuratorCache;
import org.apache.curator.framework.recipes.cache.CuratorCacheBuilder;
import org.apache.curator.framework.recipes.cache.CuratorCacheStorage;
import org.apache.curator.utils.ZKPaths;
import org.apache.druid.java.util.common.IAE;
Expand Down Expand Up @@ -144,8 +142,6 @@ public void stop()
}

if (!parentsIBuilt.isEmpty()) {
CuratorMultiTransaction transaction = curator.transaction();

ArrayList<CuratorOp> operations = new ArrayList<>();
for (String parent : parentsIBuilt) {
try {
Expand All @@ -157,7 +153,7 @@ public void stop()
}
}
try {
transaction.forOperations(operations);
curator.transaction().forOperations(operations);
}
catch (Exception e) {
log.info(e, "Unable to commit transaction.");
Expand Down

0 comments on commit cbea21a

Please sign in to comment.