Skip to content

Commit

Permalink
#2965 Atomic ZNode creation on node registration
Browse files Browse the repository at this point in the history
Reformatted changed file according to the "helix format"
  • Loading branch information
jacob-netguardians committed Dec 11, 2024
1 parent 31b0ffd commit 3686a42
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,17 @@ public void addInstance(String clusterName, InstanceConfig instanceConfig) {
// existing instance with matching logical ID (see
// InstanceUtil.findInstancesWithMatchingLogicalId call above, where finding an incomplete
// "INSTANCE" node is a killer)
final List<Op> ops = Arrays.asList(
createPersistentNodeOp(PropertyPathBuilder.instance(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceMessage(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceCurrentState(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceTaskCurrentState(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceCustomizedState(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceError(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceStatusUpdate(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceHistory(clusterName, nodeId))
);
final List<Op> ops =
Arrays.asList(createPersistentNodeOp(PropertyPathBuilder.instance(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceMessage(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceCurrentState(clusterName, nodeId)),
createPersistentNodeOp(
PropertyPathBuilder.instanceTaskCurrentState(clusterName, nodeId)),
createPersistentNodeOp(
PropertyPathBuilder.instanceCustomizedState(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceError(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceStatusUpdate(clusterName, nodeId)),
createPersistentNodeOp(PropertyPathBuilder.instanceHistory(clusterName, nodeId)));
_zkClient.multi(ops);

HelixDataAccessor accessor = new ZKHelixDataAccessor(clusterName, _baseDataAccessor);
Expand Down

0 comments on commit 3686a42

Please sign in to comment.