Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress update when many znodes exist #1

Open
tr0k opened this issue Oct 1, 2021 · 1 comment
Open

Progress update when many znodes exist #1

tr0k opened this issue Oct 1, 2021 · 1 comment

Comments

@tr0k
Copy link
Collaborator

tr0k commented Oct 1, 2021

When running a command with a more complex policy:
zkpolicy -c /opt/zkpolicy/conf/config-custom.yml audit
on a zk instance with multiple znodes I experienced long execution times (of a few minutes).

In this case, the progress updates would be of help to a user waiting for the result.
I propose to calculate the progress in % based on the number of znodes retrieved/total znodes to be retrieved.

The ensemble against which I was running the commands had the following number of znodes:

getAllChildrenNumber /
42161

The total number of znodes to be retrieved could be easily calculated using getAllChildrenNumber method.

@arvchristos
Copy link
Collaborator

arvchristos commented Oct 18, 2021

Hello @tr0k ,

Thank you for reporting this behavior.
As far as I know, getAllChildrenNumber call is not listing all nodes that will be parsed recursively but only a single level of children, hence it is not straightforward to determine the number of nodes to be parsed during znode tree traversal.

I totally agree that this will be really helpful for ZK ensembles with huge znode number like the one that you are currently executing zkpolicy on

Will have to explore the optimal way to implement this functionality. I am always open to suggestions 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants