Skip to content

fix: use queues to cache request tasks #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 21, 2023
Merged

Conversation

LIlGG
Copy link
Member

@LIlGG LIlGG commented Feb 17, 2023

使用 fastq 队列,对请求任务进行缓存,用于解决浏览器同时等待请求数过多而导致的 ERR_INSUFFICIENT_RESOURCES 错误。

Fixes #11

/kind bug

测试方式:

  1. 从 1.5/1.6 导出一份评论/文章数量较大的数据(1000+)
  2. 打开 chrome 控制台
  3. 在迁移插件页面执行导入操作。
  4. 查看控制台请求,未修复版本为一次性创建所有请求。已修复版本使用队列之后将会持续创建请求。
  5. 未修复版本处理大量数据时,部分数据浏览器会报错 ERR_INSUFFICIENT_RESOURCES。已修复版本会正确请求全部数据。

可测试 jar 包: plugin-migrate-1.1.0-SNAPSHOT.jar.zip

解决 Chrome 浏览器报错 ERR_INSUFFICIENT_RESOURCES 的问题

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Feb 17, 2023
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and ruibaby February 17, 2023 04:23
@ruibaby
Copy link
Member

ruibaby commented Feb 17, 2023

@LIlGG 希望可以提供一个可用于测试的 JAR 文件。

@LIlGG
Copy link
Member Author

LIlGG commented Feb 17, 2023

@LIlGG 希望可以提供一个可用于测试的 JAR 文件。

已 build 并上传了一份可测试 JAR 包。

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/approve

实际测试符合预期。

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 21, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 21, 2023
Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

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

/lgtm
经测试导入顺序比之前好了非常多,请求也不再是一次创建

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 21, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 0710a01 into halo-sigs:main Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

导入大量数据时,Chrome 浏览器报错 ERR_INSUFFICIENT_RESOURCES
3 participants