[
https://issues.apache.org/jira/browse/HADOOP-20046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18135162#comment-18135162
]
ASF GitHub Bot commented on HADOOP-20046:
-----------------------------------------
hadoop-yetus commented on PR #8889:
URL: https://github.com/apache/hadoop/pull/8889#issuecomment-6523689553
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Logfile | Comment |
|:----:|----------:|--------:|:--------:|:-------:|
| +0 :ok: | reexec | 18m 58s | | Docker mode activated. |
|||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | | No case conflicting files
found. |
| +0 :ok: | codespell | 0m 0s | | codespell was not available. |
| +0 :ok: | detsecrets | 0m 0s | | detect-secrets was not available.
|
| +0 :ok: | markdownlint | 0m 0s | | markdownlint was not available.
|
| +1 :green_heart: | @author | 0m 0s | | The patch does not contain
any @author tags. |
| +1 :green_heart: | test4tests | 0m 0s | | The patch appears to
include 4 new or modified test files. |
|||| _ trunk Compile Tests _ |
| +0 :ok: | mvndep | 2m 4s | | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 52m 32s | | trunk passed |
| +1 :green_heart: | compile | 18m 12s | | trunk passed with JDK
Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | compile | 18m 32s | | trunk passed with JDK
Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | checkstyle | 5m 58s | | trunk passed |
| +1 :green_heart: | mvnsite | 4m 43s | | trunk passed |
| +1 :green_heart: | javadoc | 3m 17s | | trunk passed with JDK
Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javadoc | 3m 11s | | trunk passed with JDK
Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | spotbugs | 6m 51s | | trunk passed |
| +1 :green_heart: | shadedclient | 36m 19s | | branch has no errors
when building and testing our client artifacts. |
|||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 33s | | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 48s | | the patch passed |
| +1 :green_heart: | compile | 17m 2s | | the patch passed with JDK
Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javac | 17m 2s | | the patch passed |
| +1 :green_heart: | compile | 18m 32s | | the patch passed with JDK
Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | javac | 18m 32s | | the patch passed |
| +1 :green_heart: | blanks | 0m 0s | | The patch has no blanks
issues. |
| -0 :warning: | checkstyle | 5m 55s |
[/results-checkstyle-root.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8889/1/artifact/out/results-checkstyle-root.txt)
| root: The patch generated 3 new + 28 unchanged - 0 fixed = 31 total (was
28) |
| +1 :green_heart: | mvnsite | 4m 35s | | the patch passed |
| -1 :x: | pylint | 0m 7s |
[/results-pylint.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8889/1/artifact/out/results-pylint.txt)
| The patch generated 19 new + 0 unchanged - 0 fixed = 19 total (was 0) |
| +1 :green_heart: | javadoc | 3m 13s | | the patch passed with JDK
Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javadoc | 3m 13s | | the patch passed with JDK
Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| -1 :x: | spotbugs | 3m 26s |
[/new-spotbugs-hadoop-common-project_hadoop-common.html](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8889/1/artifact/out/new-spotbugs-hadoop-common-project_hadoop-common.html)
| hadoop-common-project/hadoop-common generated 1 new + 0 unchanged - 0 fixed
= 1 total (was 0) |
| +1 :green_heart: | shadedclient | 36m 18s | | patch has no errors
when building and testing our client artifacts. |
|||| _ Other Tests _ |
| +1 :green_heart: | unit | 24m 36s | | hadoop-common in the patch
passed. |
| +1 :green_heart: | unit | 3m 39s | | hadoop-kms in the patch passed.
|
| +1 :green_heart: | unit | 51m 31s | | hadoop-hdfs-rbf in the patch
passed. |
| -1 :x: | asflicense | 1m 18s |
[/results-asflicense.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8889/1/artifact/out/results-asflicense.txt)
| The patch generated 1 ASF License warnings. |
| | | 357m 46s | | |
| Reason | Tests |
|-------:|:------|
| SpotBugs | module:hadoop-common-project/hadoop-common |
| | Useless condition:isUpdate == false at this point At
ZKDelegationTokenSecretManager.java:[line 939] |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.56 ServerAPI=1.56 base:
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8889/1/artifact/out/Dockerfile
|
| GITHUB PR | https://github.com/apache/hadoop/pull/8889 |
| Optional Tests | dupname asflicense codespell detsecrets pylint mvnsite
markdownlint compile javac javadoc mvninstall unit shadedclient spotbugs
checkstyle |
| uname | Linux 0dc6e257678b 5.15.0-198-generic #208-Ubuntu SMP Fri Sep 4
10:22:38 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/bin/hadoop.sh |
| git revision | trunk / bdbcd97c7908bc469ed4aed4a775e84d268a9ca7 |
| Default Java | Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| Multi-JDK versions |
/usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu
/usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| Test Results |
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8889/1/testReport/ |
| Max. process+thread count | 4023 (vs. ulimit of 10000) |
| modules | C: hadoop-common-project/hadoop-common
hadoop-common-project/hadoop-kms hadoop-hdfs-project/hadoop-hdfs-rbf U: . |
| Console output |
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8889/1/console |
| versions | git=2.43.0 maven=3.9.15 spotbugs=4.9.7 pylint=3.0.3 |
| Powered by | Apache Yetus 0.14.1 https://yetus.apache.org |
This message was automatically generated.
> Avoid holding the delegation-token secret manager API write lock during
> ZooKeeper renewal, cancellation, and master-key operations
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-20046
> URL: https://issues.apache.org/jira/browse/HADOOP-20046
> Project: Hadoop Common
> Issue Type: Improvement
> Components: common, kms
> Reporter: Wei-Chiu Chuang
> Priority: Major
> Labels: pull-request-available
> Attachments: HADOOP-20046-expired-key-stall.png,
> HADOOP-20046-maintenance-benchmark.md,
> HADOOP-20046-maintenance-comparison.png,
> HADOOP-20046-maintenance-results.json, HADOOP-20046-write-locks.md
>
>
> h3. Problem
> HADOOP-18851 introduced a read-write lock in
> AbstractDelegationTokenSecretManager to allow concurrent token verification.
> HADOOP-20045 addresses token creation holding that lock during ZooKeeper
> operations.
> Other paths still hold {{apiLock.writeLock()}} while performing synchronous
> ZooKeeper operations:
> || Write-lock holder || ZooKeeper operations under the lock ||
> | renewToken() | Read signing key/token information on cache misses; check
> existence and update/create token |
> | cancelToken() | Read token information, check existence, and delete token |
> | updateCurrentKey() | Check existence and persist the new master key |
> | rollMasterKey() | Check existence and persist the retiring key’s updated
> expiry |
> | removeExpiredKeys() | Check existence and delete expired master keys,
> potentially multiple keys per lock hold |
> ZooKeeper latency or retries in these paths can block unrelated requests that
> need the API read lock to verify cached tokens. This affects KMS and other
> consumers of the shared ZKDelegationTokenSecretManager, including HDFS Router.
> h3. Proposed improvement
> Move ZooKeeper operations outside the global API write-lock sections. Retain
> short critical sections for inspecting or publishing local state, with
> explicit coordination to preserve operation ordering.
> The design must ensure:
> * Renewal cannot restore a token after cancellation or overwrite a newer
> renewal.
> * Cache publication and storage-failure handling remain consistent with the
> operation’s outcome.
> * A new master key is persisted before it becomes available for signing
> tokens.
> * Retiring-key updates and expired-key deletion remain correctly ordered with
> rotation and issuance.
> * Existing storage-hook behavior for non-ZooKeeper implementations is
> preserved.
> Per-token coordination, a separate key-rotation coordinator, and versioned
> ZooKeeper operations are potential mechanisms to evaluate. Simply releasing
> the global lock around existing storage calls is insufficient.
> h3. Validation
> Add deterministic tests that pause each relevant ZooKeeper operation and
> confirm that verification of an unrelated cached token continues. Add
> concurrency and failure tests covering renewal versus cancellation,
> concurrent renewals, key rotation versus issuance, interrupted operations,
> and persistence failures.
> Extend the KMS HTTP benchmark from HADOOP-20045 to measure renewal and
> cancellation contention. Exercise key rotation and expired-key cleanup
> separately. Compare throughput and verification tail latency against the
> original implementation, using real ZooKeeper operations without injected
> delay for performance measurements.
> h3. Scope
> This issue specifically tracks ZooKeeper operations executed while holding
> {{apiLock.writeLock()}}. Read-lock cache misses, Router cache rebuilding, and
> CPU-only cleanup scans are outside its scope.
> Implementation and real-ZooKeeper benchmarks are now available. The attached
> design describes token lock stripes, versioned renewal/deletion, durable
> master-key publication, and compatibility with non-ZooKeeper stores.
> Measurements include renewal/cancellation HTTP workloads and 24 validated
> background-maintenance cases (four scenarios, two builds, three repetitions).
> See the implementation/benchmark comment and attached report, charts, and raw
> results for methods, validation, and limitations.
> h3. Related issues
> * [HADOOP-18851|https://issues.apache.org/jira/browse/HADOOP-18851]
> * [HADOOP-20045|https://issues.apache.org/jira/browse/HADOOP-20045]
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]