Skip to content

Update Ideal State API creating new ideal state #3077

@ngngwr

Description

@ngngwr

Describe the bug

When the resource gets deleted midway by customer scripts/externally after (!_zkClient.exists(zkPath)) check and another process is trying to update the deleted resource's idealstate. The resource gets created with just the updated parameters in the API payload.

This can lead to rebalance failure as well when the updated parameters does not contain the num of partitions. Rebalancer considers num_partition for this resource as -1 leading to rebalance failure.

To Reproduce

  • Start helix rest in debug mode. Trigger update ideal state API for a resource.
  • After (!_zkClient.exists(zkPath)) check point, manually delete the resource.
  • New idealstate will be created using the update ideal state API.

Expected behavior

  • Update Ideal State API should not create new ideal state resource.

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions