Skip to content

FEATURE: Add ZooKeeper discovery and cache node watching - #2

Merged
f1v3-dev merged 1 commit into
developfrom
feature/apl-161
Oct 21, 2026
Merged

f1v3-dev merged 1 commit into
developfrom
feature/apl-161

Conversation

@f1v3-dev

Copy link
Copy Markdown
Collaborator

🔗 Related Issue

⌨️ What I did

  • ZooKeeper에 여녈하고 서비스코드별 캐시 노드 목록을 조회하는 ArcusDiscovery를 구현합니다.
  • watch를 등록하여 캐시 노드 변경을 감지하고, 변경된 목록을 콜백으로 전달합니다.

@f1v3-dev
f1v3-dev requested a review from ing-eoking October 21, 2026 04:44
@f1v3-dev f1v3-dev self-assigned this Oct 21, 2026
@linear-code

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

APL-161

@f1v3-dev
f1v3-dev force-pushed the feature/apl-161 branch 3 times, most recently from 68ba8f8 to fc11f40 Compare October 21, 2026 04:54
Comment thread src/arcus/_cluster/discovery.py Outdated
Comment thread src/arcus/_cluster/discovery.py
Comment thread src/arcus/_cluster/discovery.py
Comment thread src/arcus/_cluster/discovery.py Outdated
Comment on lines +19 to +23
if not host or not 1 <= int(port or 0) <= 65535:
logger.warning(
f"Ignoring invalid cache node {child}",
)
continue

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

host, _, port = address.rpartition(":")

try:
    if not host or not (1 <= int(port) <= 65535):
        raise ValueError
    addresses.add(address)
except ValueError:
    logger.warning(f"Ignoring invalid cache node {child}")
    continue

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

        host, _, port = address.rpartition(":")

        if (
            not host
            or not port
            or not port.isascii()
            or not port.isdecimal()
            or not 1 <= int(port) <= 65535
        ):
            logger.warning(f"Ignoring invalid cache node {child}")
            continue

        addresses.add(address)

위와 같은 형태가 더 낫다고 판단하여 수정하였습니다.

@f1v3-dev
f1v3-dev merged commit 5519f48 into develop Oct 21, 2026
3 checks passed
@ing-eoking
ing-eoking deleted the feature/apl-161 branch October 21, 2026 08:18
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.

2 participants