amoro icon indicating copy to clipboard operation
amoro copied to clipboard

[AMORO-2365] Fix get target snapshot NPE when commiting

Open HuangFru opened this issue 2 years ago • 3 comments

Why are the changes needed?

Close #2365.

Brief change log

  • Add 'PLANNING' status in `OptimizingProcess.Status' and set it as default.
  • Generic the TableOptimizingProcess when the table is planning and update it after planned.
  • Change judgment in 'SnapshotExpire' to not expire the snapshot that is used for planning.
  • Change the init SQL to make 'optimizing_type' default null.

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

Documentation

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

HuangFru avatar Nov 27 '23 11:11 HuangFru

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (24dbeed) 53.14% compared to head (11c3582) 52.77%.

Files Patch % Lines
...ease/arctic/server/optimizing/OptimizingQueue.java 76.00% 7 Missing and 5 partials :warning:
...er/table/executor/TableRuntimeRefreshExecutor.java 20.00% 3 Missing and 1 partial :warning:
.../arctic/server/dashboard/utils/OptimizingUtil.java 0.00% 2 Missing :warning:
.../com/netease/arctic/server/table/TableRuntime.java 80.00% 1 Missing and 1 partial :warning:
.../optimizing/maintainer/IcebergTableMaintainer.java 83.33% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2366      +/-   ##
============================================
- Coverage     53.14%   52.77%   -0.38%     
- Complexity     3785     4374     +589     
============================================
  Files           488      534      +46     
  Lines         25641    30384    +4743     
  Branches       2450     2967     +517     
============================================
+ Hits          13628    16035    +2407     
- Misses        10953    13059    +2106     
- Partials       1060     1290     +230     
Flag Coverage Δ
core 53.11% <71.62%> (-0.04%) :arrow_down:
trino 50.93% <ø> (?)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Nov 27 '23 11:11 codecov[bot]

When the table is planning: image

image

After planning: image

image

When the table is planning: image image

Restart the AMS: image

When the table is planning I set self-optimizing.enabled to 'fasle': image image

HuangFru avatar Nov 29 '23 07:11 HuangFru

I left some comments, please take a look @HuangFru

Fixed.

HuangFru avatar Dec 06 '23 06:12 HuangFru

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Aug 22 '24 00:08 github-actions[bot]

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

github-actions[bot] avatar Aug 29 '24 00:08 github-actions[bot]