Skip to content
This repository has been 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
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 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