You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "linghengqian (via GitHub)" <gi...@apache.org> on 2026/09/20 07:52:36 UTC
[PR] Fixes bugs causing etcd integration failure [shardingsphere-elasticjob]
linghengqian opened a new pull request, #2538:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/2538
Fixes #2517 .
Changes proposed in this pull request:
- Fixes bugs causing etcd integration failure.
- Add nativeTest under GraalVM Native Image with etcd integration.
- EtcdRegistryCenter.java (around line 340), `executeInLeader`: The second argument to `lockClient.lock(key, 30)` is a `leaseId`, not a TTL (refer to `io.etcd.jetcd.Lock#lock(ByteSequence, long)`). Passing 30 inevitably triggers a "requested lease not found" error, causing all 5 `EtcdJavaTest` cases to fail. Changed the logic to first call `createLease(30)`, then `lock`, and finally `revoke`.
- `getChildrenKeys`: Previously, only leaf nodes not containing "/" were collected. This resulted in `getChildrenKeys("/")` always returning empty and prevented the retrieval of sharding indices (0/1/2) from paths like `/.../sharding` (where the actual key is `/job/sharding/0/instance`). Since `getJobsTotalCount` and `getShardingInfo` in the lifecycle module depend on this method, sharding-related test cases in `EtcdOperationJavaTest` were failing. Changed the implementation to extract the first path segment and deduplicate the results.
- `isExisted("/")`: The key `/` does not exist in etcd, causing the method to return `false`. However, `JobNodeStorage.executeInTransaction` always performs a `CHECK_EXISTS("/")` as the initial step (assuming the ZK root always exists), leading to a "Key does not exist: /" error during sharding transactions. Modified the method to return `true` directly for the root path.
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fixes bugs causing etcd integration failure [shardingsphere-elasticjob]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #2538:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/2538
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fixes bugs causing etcd integration failure [shardingsphere-elasticjob]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #2538:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/2538#issuecomment-5748574114
## [Codecov](https://app.codecov.io/gh/apache/shardingsphere-elasticjob/pull/2538?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `0%` with `22 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 75.77%. Comparing base ([`a8ba448`](https://app.codecov.io/gh/apache/shardingsphere-elasticjob/commit/a8ba448927d7e237ecece9516634a44d822a1b11?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`f85ebd7`](https://app.codecov.io/gh/apache/shardingsphere-elasticjob/commit/f85ebd752a63f15eda42481cd0f3881b74e56a07?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 94 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/shardingsphere-elasticjob/pull/2538?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...sphere/elasticjob/reg/etcd/EtcdRegistryCenter.java](https://app.codecov.io/gh/apache/shardingsphere-elasticjob/pull/2538?src=pr&el=tree&filepath=registry-center%2Fprovider%2Fetcd%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Felasticjob%2Freg%2Fetcd%2FEtcdRegistryCenter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cmVnaXN0cnktY2VudGVyL3Byb3ZpZGVyL2V0Y2Qvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VsYXN0aWNqb2IvcmVnL2V0Y2QvRXRjZFJlZ2lzdHJ5Q2VudGVyLmphdmE=) | 0.00% | [22 Missing :warning: ](https://app.codecov.io/gh/apache/shardingsphere-elasticjob/pull/2538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #2538 +/- ##
============================================
- Coverage 80.10% 75.77% -4.34%
- Complexity 1113 1155 +42
============================================
Files 204 212 +8
Lines 3821 4256 +435
Branches 445 516 +71
============================================
+ Hits 3061 3225 +164
- Misses 570 808 +238
- Partials 190 223 +33
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/shardingsphere-elasticjob/pull/2538?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org