[Do not merge] Prototype for detection of zero copy locks#401
Draft
MikhailBurdukov wants to merge 1 commit intomainfrom
Draft
[Do not merge] Prototype for detection of zero copy locks#401MikhailBurdukov wants to merge 1 commit intomainfrom
MikhailBurdukov wants to merge 1 commit intomainfrom
Conversation
Contributor
Reviewer's GuideIntroduces a prototype mechanism to scan Zookeeper’s zero-copy lock hierarchy and identify locks with no matching host by adding a detection function and exposing it through a new CLI command. Sequence diagram for the new 'find-dead-zero-copy-locks' CLI commandsequenceDiagram
actor User
participant CLI
participant "remove_hosts_from_table()"
participant "find_dead_zc_locks()"
participant "zk_client"
participant "get_children()"
User->>CLI: Run 'find-dead-zero-copy-locks' command
CLI->>"remove_hosts_from_table()": Call with args (ctx, zookeeper_table_path, shard_name, fqdn)
"remove_hosts_from_table()"->>"find_dead_zc_locks()": Call with same args
"find_dead_zc_locks()"->>"zk_client": Open Zookeeper client
"find_dead_zc_locks()"->>"get_children()": Get children of zc_root_path
loop For each table
"find_dead_zc_locks()"->>"get_children()": Get children of table_path
loop For each part
"find_dead_zc_locks()"->>"get_children()": Get children of part_path
loop For each lock
"find_dead_zc_locks()"->>"get_children()": Get children of lock_path
alt If no host in fqdn
"find_dead_zc_locks()"->>CLI: Print lock_path
end
end
end
end
"find_dead_zc_locks()"-->>"zk_client": Close Zookeeper client
Class diagram for new and modified functions in Zookeeper zero-copy lock detectionclassDiagram
class remove_hosts_from_table {
+remove_hosts_from_table(ctx: Context, zookeeper_table_path: str, shard_name: str, fqdn: list)
}
class find_dead_zc_locks {
+find_dead_zc_locks(ctx, zc_root_path, shard_name, fqdn)
}
remove_hosts_from_table --> find_dead_zc_locks: calls
class zk_client {
+__enter__()
+__exit__()
}
find_dead_zc_locks --> zk_client: uses
class get_children {
+get_children(zk, path)
}
find_dead_zc_locks --> get_children: uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The prototype script that should detect dead zero copy locks. Probably will be never merged but lets keep it anyway, may be one day will be useful
Summary by Sourcery
Introduce a prototype tool to detect dead zero-copy locks in Zookeeper by adding a scanning function and exposing it via a new CLI command
New Features: