Cyb/vendor dependency - #18481
Open
alpass163gmail wants to merge 4 commits into
Open
Conversation
added 4 commits
August 17, 2026 10:19
…pendency of com.google.common
Wire maven-checkstyle-plugin and checkstyle.xml to load suppressions.xml. Vendored Guava intentionally calls ScheduledExecutorService scheduleAtFixedRate and scheduleWithFixedDelay to preserve upstream behavior, so suppress only the unsafeThreadSchedule rule for the relocated Guava sources without changing runtime semantics or disabling other regexp checks.
Keep the upstream Guava IO implementation unchanged and preserve its legacy file operation semantics. Exclude only relocated Guava Files and FileBackedOutputStream classes from the secure-erase forbiddenapis scan, while continuing to scan all other project classes.
…google.guava:guava)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Summary
This PR vendors the runtime sources of Guava 32.1.2-jre and Caffeine 2.9.3 into node-commons, allowing IoTDB-owned
modules to stop depending directly on the external Guava and Caffeine artifacts.
The implementation preserves existing APIs and runtime behavior by relocating packages and updating imports without
rewriting cache, collection, future, or concurrency logic.
Changes
Vendored 624 Guava source files and 2 failureaccess source files.
Vendored 581 Caffeine source files.
Relocated packages:
Replaced IoTDB source imports and fully qualified compile-time references with the relocated packages.
Removed direct Guava and Caffeine dependencies from IoTDB modules.
Removed Guava and Caffeine version management from the root POM.
Kept library-udf as an explicit exception because it still uses the original com.google.common.math.Quantiles API.
Replaced the two simple Guava usages in relational-grammar with JDK equivalents:
Annotation Cleanup
The official source artifacts reference several annotation-only dependencies. Their annotations and imports were removed
from the vendored sources:
This does not remove explicit runtime validation such as requireNonNull or checkNotNull. Method bodies, signatures,
control flow, cache behavior, and exception handling remain unchanged. The removed annotations only affect static
analysis and non-JVM tooling metadata.
Build Rule Adjustments
Vendored third-party sources are now checked as IoTDB-owned source and bytecode, which exposed conflicts with project-
specific rules that did not previously scan external dependency JARs.
Checkstyle
Guava directly uses scheduleAtFixedRate and scheduleWithFixedDelay as part of its upstream scheduling implementation.
IoTDB normally requires these calls to go through ScheduledExecutorUtil.
A dedicated suppressions.xml was added and connected to the Maven Checkstyle plugin. It suppresses only the
unsafeThreadSchedule rule for relocated Guava sources while leaving all other Checkstyle rules enabled.
Forbidden APIs
IoTDB's secure-erase forbidden API rules reject legacy file APIs that may bypass SecureFileSystemProvider. Complete
Guava sources contain such calls in:
These classes are excluded from the forbidden API scan to keep the upstream Guava implementation unchanged. All other
project and vendored classes remain covered by the check.
Compatibility
implementation.
Verification
Static verification confirmed: