Skip to content
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

refactor: optimize notification and subscription query using index #5414

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

guqing
Copy link
Member

@guqing guqing commented Feb 27, 2024

What type of PR is this?

/kind improvement
/area core
/milestone 2.13.x

What this PR does / why we need it:

使用索引机制优化通知和订阅查询以提高性能

how to test it
测试通知列表不报错即可

Does this PR introduce a user-facing change?

使用索引机制优化通知和订阅查询以提高性能

@f2c-ci-robot f2c-ci-robot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/improvement Categorizes issue or PR as related to a improvement. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Feb 27, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.13.x milestone Feb 27, 2024
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Feb 27, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from JohnNiang and wan92hen February 27, 2024 10:46
@guqing
Copy link
Member Author

guqing commented Feb 27, 2024

/ping @ruibaby 通知查询的参数有变动需要重新生成 api-client 并配置,将查询字段都改为对应的 spec.xxx

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 48.35165% with 47 lines in your changes are missing coverage. Please review.

Project coverage is 56.92%. Comparing base (5fdf6c0) to head (871ef91).
Report is 33 commits behind head on main.

Files Patch % Lines
...lo/app/notification/DefaultNotificationCenter.java 24.00% 18 Missing and 1 partial ⚠️
...n/halo/app/notification/UserNotificationQuery.java 0.00% 18 Missing ⚠️
...ain/java/run/halo/app/infra/SchemeInitializer.java 80.95% 8 Missing ⚠️
...o/app/notification/DefaultNotificationService.java 0.00% 1 Missing ⚠️
...otification/endpoint/UserNotificationEndpoint.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5414      +/-   ##
============================================
+ Coverage     56.91%   56.92%   +0.01%     
- Complexity     3319     3345      +26     
============================================
  Files           587      589       +2     
  Lines         18968    19145     +177     
  Branches       1401     1394       -7     
============================================
+ Hits          10795    10899     +104     
- Misses         7594     7663      +69     
- Partials        579      583       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Ryan Wang <i@ryanc.cc>
@ruibaby
Copy link
Member

ruibaby commented Feb 27, 2024

/ping @ruibaby 通知查询的参数有变动需要重新生成 api-client 并配置,将查询字段都改为对应的 spec.xxx

Done

Copy link

sonarcloud bot commented Feb 27, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.3% Duplication on New Code

See analysis details on SonarCloud

@guqing guqing marked this pull request as ready for review February 27, 2024 11:17
@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 27, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from LIlGG and wzrove February 27, 2024 11:17
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

It works very well.

/approve

@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 27, 2024
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.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 27, 2024
Copy link

f2c-ci-robot bot commented Feb 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, 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 merged commit 1111441 into halo-dev:main Feb 27, 2024
8 checks passed
@ruibaby ruibaby modified the milestones: 2.13.x, 2.13.0 Feb 27, 2024
@guqing guqing deleted the refactor/indexed-notification branch February 27, 2024 11:54
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. area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. 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.

3 participants