You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "hanzhe-one (via GitHub)" <gi...@apache.org> on 2026/09/29 17:14:08 UTC

[PR] Fix: correct TLS key check and zookeeper diff map lookup #206 [dubbo-rust]

hanzhe-one opened a new pull request, #208:
URL: https://github.com/apache/dubbo-rust/pull/208

   ## What this PR does
   
   Fixes both bugs reported in #206.
   
   ### 1. TLS conditional always true (`dubbo/src/triple/transport/service.rs`)
   
   ```rust
   if self.certs.len() != 0 && !self.keys.len() != 0 {
   ```
   
   `!self.keys.len() != 0` parses as `(!self.keys.len()) != 0`. `!` is bitwise-not on a `usize`, so the expression is always `true`. When certs are present but `keys` is empty this reaches `keys.remove(0)` and panics. Removed the stray `!` so the guard matches the correct form already used in `server/builder.rs`.
   
   ### 2. Wrong map queried in `diff()` (`registry/zookeeper/src/lib.rs`)
   
   The second loop iterated `old_urls_map` and then looked the key up in `old_urls_map` again, so `new_host` was always `Some` and `removed_hosts` never collected nodes that had gone offline. Consumers kept routing to "zombie" providers after shutdown. Changed the lookup to `new_urls_map`.
   
   ## Testing
   
   - `cargo build -p dubbo -p dubbo-registry-zookeeper` passes.
   - `cargo +nightly fmt --check` passes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Fix: correct TLS key check and zookeeper diff map lookup #206 [dubbo-rust]

Posted by "hanzhe-one (via GitHub)" <gi...@apache.org>.
hanzhe-one commented on PR #208:
URL: https://github.com/apache/dubbo-rust/pull/208#issuecomment-5895147634

   Note on the failing CI checks — both are pre-existing on `main` and unrelated to this 2-line source change (no `Cargo.toml` / `Cargo.lock` changes here):
   
   1. **`CI` workflow → `startup_failure`**: the workflow never starts (0 jobs). It uses the archived/deprecated `actions-rs/toolchain@v1` in `.github/workflows/github-actions.yml`. The same `startup_failure` shows up on other recent PRs (e.g. branch `codex/raw-unary-runtime-core`).
   
   2. **`License checker` → `failure`**: skywalking-eyes flags transitive dependencies licensed under `Unicode-3.0` (`icu_*`, `zerovec`, `tinystr`, `writeable`, …) as incompatible. These are pulled in via `url`/`idna` and are unrelated to this change.
   
   Locally `cargo build -p dubbo -p dubbo-registry-zookeeper` and `cargo +nightly fmt --check` both pass. Happy to open a separate PR to fix the CI workflow / license-checker allowlist if that would help.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org