Conversation
oliviarla
reviewed
Aug 10, 2026
| @@ -77,11 +78,41 @@ func groupServersByHost(servers []topology.ZKServer) map[string][]topology.ZKSer | |||
| } | |||
|
|
|||
| func removeHostFiles(host string, servers []topology.ZKServer, topoPath string) error { | |||
Member
There was a problem hiding this comment.
각각 어떤 처리를 하는건지 주석이나 별도 메서드화하는게 좋을 것 같습니다. 한번에 이해하기 어려운 상태네요ㅜ
Collaborator
Author
There was a problem hiding this comment.
불필요하게 사용자가 지정한 data_dir, data_log_dir 상위 디렉토리까지 정리하는 코드가 들어가있다보니 이해하기 어려웠던 것 같습니다.
해당 로직은 제거하고 삭제 대상을 아래와 같이 한정하고, 경로 계산 로직을 따로 분리하였습니다.
원격 호스트 삭제 대상
- ZooKeeper 설치 경로
- 노드별
<data_dir>/zk<myid>및<data_log_dir>/zk<myid>디렉터리
oliviarla
approved these changes
Aug 11, 2026
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.
🔗 Related Issue
⌨️ What I did
data_dir및data_dir_log디렉터리를 생성하도록 수정하였습니다.data_dir및data_dir_log디렉터리를 함께 삭제하도록 수정하였습니다.data_dir,data_log_dir상위 디렉터리를 정리합니다.