helix icon indicating copy to clipboard operation
helix copied to clipboard

Sharing existing zkClient instead of creating new one while creating DryrunWagedRebalancer

Open rahulrane50 opened this issue 2 years ago • 1 comments

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.

rahulrane50 avatar Jul 22 '22 17:07 rahulrane50

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.

jiajunwang avatar Jul 26 '22 16:07 jiajunwang