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

[Enhancement] Show last task failure in result of show routine load #35806

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

rickif
Copy link
Contributor

@rickif rickif commented Nov 26, 2023

Why I'm doing:
We need the result of the failed routine load tasks to investigate the failure.
What I'm doing:
This PR adds the last task failure information to in the OtherMsg of show routine load result.

MySQL [db0]> show routine load\G;
*************************** 1. row ***************************
                  Id: 11001
                Name: rl_simple12
          CreateTime: 2023-11-26 12:39:55
           PauseTime: NULL
             EndTime: NULL
              DbName: db0
           TableName: tbl_simple
               State: RUNNING
      DataSourceType: KAFKA
      CurrentTaskNum: 1
       JobProperties: {"partitions":"*","partial_update":"false","columnToColumnExpr":"key1,key2","maxBatchIntervalS":"10","partial_update_mode":"null","whereExpr":"*","dataFormat":"json","timezone":"GMT+08:00","format":"json","log_rejected_record_num":"0","taskTimeoutSecond":"60","json_root":"","maxFilterRatio":"1.0","strict_mode":"false","jsonpaths":"","taskConsumeSecond":"15","desireTaskConcurrentNum":"5","maxErrorNum":"0","strip_outer_array":"false","currentTaskConcurrentNum":"1","maxBatchRows":"200000"}
DataSourceProperties: {"topic":"topic-simple-json-continuous1","currentKafkaPartitions":"0","brokerList":"127.0.0.1:49092"}
    CustomProperties: {"group.id":"rl_simple12_ee75d1da-9ed1-4b74-9049-edc945e4aedf"}
           Statistic: {"receivedBytes":0,"errorRows":0,"committedTaskNum":0,"loadedRows":0,"loadRowsRate":0,"abortedTaskNum":16,"totalRows":0,"unselectedRows":0,"receivedBytesRate":0,"taskExecuteTimeMs":1}
            Progress: {"0":"1007861"}
ReasonOfStateChanged: 
        ErrorLogUrls: 
         TrackingSQL: 
            OtherMsg: 2023-11-26 12:43:05: Memory of Fragment 4685b73b-b1cb-413c-a7db-bcb8079a58ab exceed limit. try consume:917504 Used: -3263696, Limit: 2097152. Mem usage has exceed the limit of single query, You can change the limit by set session variable query_mem_limit.

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.2
    • 3.1
    • 3.0
    • 2.5

@mergify mergify bot assigned rickif Nov 26, 2023
@rickif rickif force-pushed the feat/show-last-failure branch from e9508e0 to 924cb47 Compare November 27, 2023 02:36
@rickif rickif requested a review from a team as a code owner November 27, 2023 02:36
@rickif rickif force-pushed the feat/show-last-failure branch 2 times, most recently from 5fd788d to 843ce5d Compare November 27, 2023 09:05
@rickif rickif force-pushed the feat/show-last-failure branch from 843ce5d to 6cbe8e3 Compare November 27, 2023 09:05
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.21) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 3 / 3 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/load/routineload/RoutineLoadJob.java 3 3 100.00% []

Copy link
Contributor

@wyb wyb left a comment

Choose a reason for hiding this comment

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

if all tasks become normal later, is it necessary to reset the error message?

@rickif
Copy link
Contributor Author

rickif commented Nov 28, 2023

if all tasks become normal later, is it necessary to reset the error message?

@wyb Since there's timestamp in the error message, I think it's ok not to reset it.

@meegoo meegoo merged commit 9b034d7 into StarRocks:main Nov 30, 2023
Copy link

@Mergifyio backport branch-3.2

@github-actions github-actions bot removed the 3.2 label Nov 30, 2023
Copy link

@Mergifyio backport branch-3.1

@github-actions github-actions bot removed the 3.1 label Nov 30, 2023
Copy link

@Mergifyio backport branch-3.0

@github-actions github-actions bot removed the 3.0 label Nov 30, 2023
Copy link

@Mergifyio backport branch-2.5

@github-actions github-actions bot removed the 2.5 label Nov 30, 2023
Copy link
Contributor

mergify bot commented Nov 30, 2023

backport branch-3.2

✅ Backports have been created

Copy link
Contributor

mergify bot commented Nov 30, 2023

backport branch-3.1

✅ Backports have been created

Copy link
Contributor

mergify bot commented Nov 30, 2023

backport branch-3.0

✅ Backports have been created

Copy link
Contributor

mergify bot commented Nov 30, 2023

backport branch-2.5

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 30, 2023
mergify bot pushed a commit that referenced this pull request Nov 30, 2023
mergify bot pushed a commit that referenced this pull request Nov 30, 2023
mergify bot pushed a commit that referenced this pull request Nov 30, 2023
@rickif rickif deleted the feat/show-last-failure branch November 30, 2023 07:52
wyb pushed a commit that referenced this pull request Nov 30, 2023
wyb pushed a commit that referenced this pull request Nov 30, 2023
wyb pushed a commit that referenced this pull request Nov 30, 2023
wyb pushed a commit that referenced this pull request Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants