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 2025/07/24 09:40:03 UTC
[PR] Prevent `generateMetadata` Profiles from generating GraalVM Reachability Metadata for arrays [shardingsphere]
linghengqian opened a new pull request, #36067:
URL: https://github.com/apache/shardingsphere/pull/36067
For #29052 .
Changes proposed in this pull request:
- Prevent `generateMetadata` Profiles from generating GraalVM Reachability Metadata for arrays.
- According to https://github.com/oracle/graal/issues/5900 , it is hard to say why GTA needs to collect this useless JSON.
---
Before committing this PR, I'm sure that I have checked the following options:
- [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [x] I have self-reviewed the commit code.
- [x] I have (or in comment I request) added corresponding labels for the pull request.
- [x] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [x] I have added corresponding unit tests for my changes.
- [ ] I have updated the Release Notes of the current development version. For more details, see [Update Release Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
--
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] Prevent `generateMetadata` Profiles from generating GraalVM Reachability Metadata for arrays and `JdkLogger` [shardingsphere]
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on code in PR #36067:
URL: https://github.com/apache/shardingsphere/pull/36067#discussion_r2230405377
##########
.github/workflows/graalvm.yml:
##########
@@ -60,12 +60,20 @@ jobs:
java-version: ${{ matrix.java-version }}
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
- cache: 'maven'
native-image-job-reports: 'true'
+ - uses: actions/cache@v4
+ with:
+ path: ~/.m2/repository
+ key: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-cache-${{ github.sha }}
+ restore-keys: |
+ ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-cache-
+ ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-
# TODO Remove this workaround after. The graalvm native image built with windows server is missing some GRMs for testcontainers
- name: Run test with GraalVM CE
if: matrix.os == 'windows-2025'
- run: ./mvnw -PgenerateMetadata -e -T 1C clean test
+ run: ./mvnw -PgenerateMetadata -e -T 1C clean verify
- name: Run nativeTest with GraalVM CE for ${{ matrix.java-version }}
if: matrix.os == 'ubuntu-latest'
- run: ./mvnw -PnativeTestInShardingSphere -e clean test
+ env:
+ MAVEN_OPTS: "-Xmx512m"
+ run: ./mvnw -PnativeTestInShardingSphere -e clean verify
Review Comment:
- The `native-image` command line tool now expects nearly 10GB of free memory, which is a tricky thing to do. . . . Perhaps using `-XX:MaxRAMPercentage=70.0` for the `native-image` command line tool is a better choice.
```shell
Build resources:
- 8.71GB of memory (55.8% of 15.62GB system memory, determined at start)
- 4 thread(s) (100.0% of 4 available processor(s), determined at start)
[junit-platform-native] Running in 'test listener' mode using files matching pattern [junit-platform-unique-ids*] found in folder [/home/runner/work/shardingsphere/shardingsphere/test/native/target/test-ids] and its subfolders.
[2/8] Performing analysis... [******] (631.8s @ 7.25GB)
GC warning: 456.8s spent in 1279 GCs during the last stage, taking up 70.82% of the time.
Please ensure more than 9.23GB of memory is available for Native Image
to reduce GC overhead and improve image build time.
66,278 reachable types (87.7% of 75,576 total)
108,673 reachable fields (54.4% of 199,808 total)
352,047 reachable methods (60.0% of 586,525 total)
83,746 types, 820 fields, and 5,645 methods registered for reflection
131 types, 120 fields, and 118 methods registered for JNI access
4 native libraries: dl, pthread, rt, z
```
--
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] Prevent `generateMetadata` Profiles from generating GraalVM Reachability Metadata for arrays and `JdkLogger` [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #36067:
URL: https://github.com/apache/shardingsphere/pull/36067
--
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