czy006 opened a new pull request, #4356:
URL: https://github.com/apache/amoro/pull/4356
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
https://amoro.apache.org/how-to-contribute/
2. If the PR is related to an issue in
https://github.com/apache/amoro/issues, add '[AMORO-XXXX]' in your PR title,
e.g., '[AMORO-XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g.,
'[WIP][AMORO-XXXX] Your PR title ...'.
-->
## Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about its use case.
2. If you fix a bug, you can clarify why it is a bug.
3. Use Fix/Resolve/Close #{ISSUE_NUMBER} to link this PR to its related
issue
-->
The table optimizing status metrics (table_optimizing_status_in_* and
table_optimizing_status_*_duration_mills) have been broken since the
TableRuntime storage refactor in AMORO-3747:
1. TableOptimizingMetrics#statusChanged is never invoked, so the status
gauges stay at their initial values (idle) for the whole process lifetime and
non-idle durations are always zero.
2. The runtime is not seeded with the persisted status code and update time
when constructed, so durations restart from zero after an AMS restart.
3. Same-status status-code writes (e.g. setPendingInput on a non-idle table)
refresh status_code_update_time, restarting the persisted duration clock used
by the dashboard.
## Brief change log
<!--
Clearly describe the changes made in modules, classes, methods, etc.
-->
- seed TableOptimizingMetrics from the persisted status code and
status_code_update_time when constructing DefaultTableRuntime
- notify the metrics from the status-change handler after the update is
committed to the store
- skip status-code updates that don't change the value, so no-op writes no
longer refresh status_code_update_time or fire redundant status-change
notifications
## How was this patch tested?
- [x] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [x] Add screenshots for manual tests if appropriate
- [x] Run test locally before making a pull request
## Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs /
not documented)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]