Skip to content

Comments

v9.3.6#1679

Merged
Ghost-chu merged 9 commits intoreleasefrom
master
Feb 20, 2026
Merged

v9.3.6#1679
Ghost-chu merged 9 commits intoreleasefrom
master

Conversation

@Ghost-chu
Copy link
Member

@Ghost-chu Ghost-chu commented Feb 20, 2026

改进

  • 调整 BiglyBT 上的活跃种子判定条件,减少活动种子数,缩短检测耗时 @Ghost-chu
  • 删除数据时,只选中必要的字段,加快删除速度,减少磁盘 I/O @Ghost-chu

错误修复

  • 修复 Install4j 裁剪的 JVM 无法进行堆内存转储的问题 @Ghost-chu
  • 撤销内存参数调整,还原旧版本内存回收行为,解决部分用户设备上内存占用虚高的问题 @Ghost-chu
  • 修复 IPDB 数据库下载/初始化失败后,仍然进行查询产生空指针错误的问题 @Ghost-chu

Docker

DockerHub: ghostchu/peerbanhelper:v9.3.6
阿里云国内镜像加速: registry.cn-hangzhou.aliyuncs.com/ghostchu/peerbanhelper:v9.3.6


部署教程 | 常见问题 | 如何设置下载器

Copilot AI review requested due to automatic review settings February 20, 2026 10:33
@Ghost-chu Ghost-chu requested a review from a team as a code owner February 20, 2026 10:33
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch master

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • 内存管理优化: 撤销了特定的JVM内存参数(-XX:ZCollectionInterval),并在各种部署配置(Docker、install4j、systemd、FreeBSD、便携式批处理脚本)中引入了-XX:SoftMaxHeapSize=386M,以解决高内存使用问题并恢复旧的内存回收行为。
  • Install4j JVM修复: 在Install4j配置中添加了jdk.management模块,解决了在裁剪的JVM环境中无法执行堆内存转储的问题。
  • 数据库删除优化: 通过在AlertEntity、HistoryEntity、PCBAddressEntity和PeerRecordEntity的批量删除操作中明确只选择Id字段,提高了数据删除性能,减少了磁盘I/O。
  • BiglyBT活跃种子逻辑调整: 通过过滤具有活跃下载或上传速度的种子,优化了BiglyBT中识别活跃种子的逻辑,旨在减少报告的活跃种子数量并提高检测效率。
  • 版本更新: 将项目版本更新至9.3.6。
Changelog
  • Dockerfile
    • 更新了Java启动参数,将-XX:ZCollectionInterval替换为-XX:SoftMaxHeapSize=386M。
  • Dockerfile-Release
    • 更新了Java启动参数,将-XX:ZCollectionInterval替换为-XX:SoftMaxHeapSize=386M。
  • build.gradle.kts
    • 更新了项目版本从9.3.5到9.3.6。
  • install4j/project.install4j
    • 更新了JVM启动标志,将-XX:ZCollectionInterval替换为-XX:SoftMaxHeapSize=386M。
    • 添加了jdk.management模块以支持JVM管理功能。
  • pkg/deb/usr/lib/systemd/system/peerbanhelper.service
    • 更新了ExecStart命令中的Java参数,将-XX:ZCollectionInterval替换为-XX:SoftMaxHeapSize=386M。
  • pkg/pkg/work-dir/usr/local/etc/rc.d/peerbanhelper
    • 更新了peerbanhelper_jvm_flags,将-XX:ZCollectionInterval替换为-XX:SoftMaxHeapSize=386M。
  • pkg/portable/1) 以 GUI 模式启动.bat
    • 移除了Java启动参数-XX:ZCollectionInterval=60。
  • pkg/portable/1. GUI Mode.bat
    • 移除了Java启动参数-XX:ZCollectionInterval=60。
  • pkg/portable/2) 以 GUI 模式启动(静默启动到托盘图标).bat
    • 移除了Java启动参数-XX:ZCollectionInterval=60。
  • pkg/portable/2. GUI mode (silent).bat
    • 移除了Java启动参数-XX:ZCollectionInterval=60。
  • pkg/portable/3) 以控制台模式启动.bat
    • 移除了Java启动参数-XX:ZCollectionInterval=60。
  • pkg/portable/3. Console.bat
    • 移除了Java启动参数-XX:ZCollectionInterval=60。
  • src/main/java/com/ghostchu/peerbanhelper/databasent/service/impl/common/AlertServiceImpl.java
    • 优化了deleteOldAlerts方法,在批量删除时明确选择Id字段。
  • src/main/java/com/ghostchu/peerbanhelper/databasent/service/impl/common/HistoryServiceImpl.java
    • 优化了deleteExpiredLogs方法,在批量删除时明确选择Id字段。
  • src/main/java/com/ghostchu/peerbanhelper/databasent/service/impl/common/PCBAddressServiceImpl.java
    • 优化了cleanupDatabase方法,在批量删除时明确选择Id字段。
  • src/main/java/com/ghostchu/peerbanhelper/databasent/service/impl/common/PeerRecordServiceImpl.java
    • 优化了cleanup方法,在批量删除时明确选择Id字段。
  • src/main/java/com/ghostchu/peerbanhelper/downloader/impl/biglybt/BiglyBT.java
    • 添加了java.util.stream.Collectors导入。
    • 修改了getTorrents方法,以过滤掉没有活跃下载或上传速度的种子。
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Ghost-chu Ghost-chu merged commit f469637 into release Feb 20, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants