apache / apache/dubbo-rust

ZooKeeper Service Discovery Fails to Detect Node Shutdown

Open
#206 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
296
Forks
65
PR merge metrics
No merged PRs in 30d

Description

case 1:

Issue:
ZooKeeper service discovery fails to detect service instances going offline — Critical

Root cause:
In `registry/zookeeper/src/lib.rs`, the second loop within the `diff()` function queries the wrong map:

As a result, `removed_hosts` remains empty, and consumers continue to send requests to "zombie" nodes after the provider has gone offline.

case 2:

Issue:
Incorrect operator precedence in TLS conditional expression — Critical

Root cause:
`!self.keys.len() != 0` always evaluates to `true`; this causes a panic due to `remove(0)` when certificates are present but keys are missing.

Contributor guide

Open the contributing guide

Research direction

Start in registry/zookeeper/src/lib.rs and inspect the second loop in diff(), tracing which map it queries and how removed_hosts is populated. Reproduce or add coverage for provider shutdown so offline instances are removed from discovery. Then locate the TLS conditional described in case 2 and verify certificate/key combinations no longer reach the reported panic path.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
distributed-systems, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.