Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @Ghost-chu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求引入了9.3.6版本,主要侧重于性能改进和错误修复。主要变化包括通过调整JVM参数优化内存使用,通过选择最少字段提高数据库删除效率,以及优化BiglyBT的活跃种子检测逻辑。此外,它还解决了Install4j裁剪的JVM中堆内存转储的问题。 Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR releases version 9.3.6 with performance improvements and bug fixes focused on BiglyBT torrent filtering, database cleanup optimization, and JVM memory management.
Changes:
- Optimizes BiglyBT active torrent detection by filtering for torrents with active upload/download speed
- Improves database cleanup performance by selecting only ID fields during batch deletions
- Reverts ZGC collection interval in favor of soft heap size limit and adds jdk.management module for heap dump support
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/ghostchu/peerbanhelper/downloader/impl/biglybt/BiglyBT.java | Adds filtering to getTorrents() to only include torrents with active upload/download speed; adds missing Collectors import |
| src/main/java/com/ghostchu/peerbanhelper/databasent/service/impl/common/PeerRecordServiceImpl.java | Optimizes cleanup query to select only ID field |
| src/main/java/com/ghostchu/peerbanhelper/databasent/service/impl/common/PCBAddressServiceImpl.java | Optimizes cleanup query to select only ID field |
| src/main/java/com/ghostchu/peerbanhelper/databasent/service/impl/common/HistoryServiceImpl.java | Optimizes cleanup query to select only ID field |
| src/main/java/com/ghostchu/peerbanhelper/databasent/service/impl/common/AlertServiceImpl.java | Optimizes cleanup query to select only ID field |
| pkg/pkg/work-dir/usr/local/etc/rc.d/peerbanhelper | Replaces -XX:ZCollectionInterval=60 with -XX:SoftMaxHeapSize=386M in FreeBSD RC script |
| pkg/deb/usr/lib/systemd/system/peerbanhelper.service | Replaces -XX:ZCollectionInterval=60 with -XX:SoftMaxHeapSize=386M in systemd service |
| install4j/project.install4j | Replaces -XX:ZCollectionInterval=60 with -XX:SoftMaxHeapSize=386M and adds jdk.management module for heap dumps |
| build.gradle.kts | Version bump from 9.3.5 to 9.3.6 |
| Dockerfile-Release | Replaces -XX:ZCollectionInterval=60 with -XX:SoftMaxHeapSize=386M in Docker entrypoint |
| Dockerfile | Replaces -XX:ZCollectionInterval=60 with -XX:SoftMaxHeapSize=386M in Docker entrypoint |
src/main/java/com/ghostchu/peerbanhelper/downloader/impl/biglybt/BiglyBT.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Code Review
The pull request introduces several changes primarily focused on optimizing Java Virtual Machine (JVM) memory usage and improving database cleanup operations. The JVM arguments have been adjusted across various deployment configurations (Docker, Install4j, systemd service, and portable batch scripts) to replace ZCollectionInterval with SoftMaxHeapSize=386M, aiming to address high memory consumption issues. Additionally, the build.gradle.kts file has been updated to reflect a version bump to 9.3.6. In the database service implementations, select(AlertEntity::getId) has been added to LambdaQueryWrapper for batch delete operations, which should improve performance by only selecting the primary key during deletion. A new jdk.management module has also been added to the install4j configuration. Finally, the BiglyBT downloader implementation now filters active torrents based on download or upload speed, which aligns with the description's goal of reducing active torrent count and detection time. Overall, the changes appear to be well-intentioned for performance and memory optimization. All original comments were kept as they did not contradict any of the provided rules.
改进
错误修复
Docker
DockerHub:
ghostchu/peerbanhelper:v9.3.6阿里云国内镜像加速:
registry.cn-hangzhou.aliyuncs.com/ghostchu/peerbanhelper:v9.3.6部署教程 | 常见问题 | 如何设置下载器