Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

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

Open
v-stepanov wants to merge 4 commits intomasterfrom
ARUHA-2328
Open

ARUHA-2328: added tmp script for removing locks of deleted subscriptions;#1057
v-stepanov wants to merge 4 commits intomasterfrom
ARUHA-2328

Conversation

@v-stepanov
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

antban commented Jun 11, 2019

👍

@antban
Copy link
Copy Markdown
Contributor

antban commented Jul 31, 2019

@v-stepanov Are you still here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants