helix
helix copied to clipboard
Sharing existing zkClient instead of creating new one while creating DryrunWagedRebalancer
Describe the bug
Currently every time a calcBestPossState is called for any verify event, while creating DryrunWagedRebalancer we just pass metadataStoreAddresses from zkClient object and create a new zkClient object in ZkBucketDataAccessor. Ideally whole zkClient object should be passed and re-used by ZkBucketDataAccessor
To Reproduce
Steps to reproduce the behavior.
Expected behavior
We need to investigate why is this zkClient object not shared but created newly. I believe we can atleast share zkConnection if not zkClient object.
Additional context
Add any other context about the problem here.
I believe there was a leakage so we decided to create new client for easier cleanup. Please be mindful to ensure the client will be closed properly if we are going to change this logic.