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

ARUHA-2328: added tmp script for removing locks of deleted subscriptions; #1057

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

v-stepanov
Copy link
Contributor

ARUHA-2328: added tmp script for removing locks of deleted subscriptions;


int notExists = 0;
for (int i = 0; i < locks.size(); i++) {
System.out.println((i * 100 / (locks.size() - 1)) + "%");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Division by zero

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it reports 100 before executing action

final String contextPath = "/staging";

final List<String> locks = zk.getChildren(contextPath + "/nakadi/locks", false);
final List<String> subscriptions = zk.getChildren(contextPath + "/nakadi/subscriptions", false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10000 subscriptions, 100000 locks. It makes sense to use HashSet for subscriptions

@antban
Copy link
Contributor

antban commented Jun 7, 2019

But honestly - I don't care about this script, cause it will not be merged

@v-stepanov
Copy link
Contributor Author

@antban I addressed all the terrible problems of this script;

import java.util.List;
import java.util.Set;

public class SubscriptionLocksCleaner {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document additional VM arguments that should be used to run this thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antban
Copy link
Contributor

antban commented Jun 11, 2019

👍

@antban
Copy link
Contributor

antban commented Jul 31, 2019

@v-stepanov Are you still here?

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

Successfully merging this pull request may close these issues.

None yet

2 participants