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

[AMORO-3279] Get the total result when retrieve the optimizing tables from db #3283

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

klion26
Copy link
Member

@klion26 klion26 commented Oct 20, 2024

Why are the changes needed?

Close #3279

Brief change log

Before the change, the total number of optimizing tables with the given filter will be retrieved from memory, this means that we'll retrieve info from two different place, after the change, we'll retrieve the optimizing tables and total result both frm db by using PageHelper.

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request
    image
    image

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)

@github-actions github-actions bot added the module:ams-server Ams server module label Oct 20, 2024
@klion26 klion26 force-pushed the 3279-imporve-with-pagehelper branch 2 times, most recently from 828f397 to 9adff28 Compare October 20, 2024 09:21
@klion26 klion26 force-pushed the 3279-imporve-with-pagehelper branch from 9adff28 to 5393cdf Compare October 21, 2024 06:57
@klion26
Copy link
Member Author

klion26 commented Oct 21, 2024

@zhoujinsong @majin1102 could you please have a look at this when you're free, thanks.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 44.44444% with 15 lines in your changes missing coverage. Please review.

Project coverage is 30.17%. Comparing base (63b355d) to head (5393cdf).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...dashboard/controller/OptimizerGroupController.java 7.14% 13 Missing ⚠️
...ache/amoro/server/optimizing/OptimizingStatus.java 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3283      +/-   ##
============================================
+ Coverage     22.54%   30.17%   +7.63%     
- Complexity     2312     3841    +1529     
============================================
  Files           397      580     +183     
  Lines         38201    48020    +9819     
  Branches       5437     6207     +770     
============================================
+ Hits           8611    14491    +5880     
- Misses        28863    32538    +3675     
- Partials        727      991     +264     
Flag Coverage Δ
core 30.17% <44.44%> (?)
trino ?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

The PR looks good overall, but I have a minor suggestion for improvement.

@klion26 klion26 force-pushed the 3279-imporve-with-pagehelper branch 2 times, most recently from 497aa0b to dbae79c Compare October 21, 2024 10:05
… from db

Before the change, the total number of optimizing tables with the given filter
will be retrieved from memory, this means that we'll retrieve info from two different place,
after the change, we'll retrieve the optimizing tables and total result both frm db by
using PageHelper.
@klion26 klion26 force-pushed the 3279-imporve-with-pagehelper branch from dbae79c to 606837f Compare October 21, 2024 11:02
@klion26 klion26 requested a review from zhoujinsong October 21, 2024 11:02
Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

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

LGTM.

@zhoujinsong zhoujinsong merged commit 3750ef2 into apache:master Oct 21, 2024
4 checks passed
@klion26 klion26 deleted the 3279-imporve-with-pagehelper branch October 21, 2024 12:20
@klion26
Copy link
Member Author

klion26 commented Oct 21, 2024

@zhoujinsong thanks for the review and merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:ams-server Ams server module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement]: Using pagehelper to improve the implementation for tableService#getTableRuntimes
3 participants