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

[Feature] Adds routine_load_unstable_threshold_second #36222

Merged
merged 8 commits into from
Dec 14, 2023

Conversation

rickif
Copy link
Contributor

@rickif rickif commented Dec 1, 2023

Why I'm doing:
When a routine load job gets sustained failure, the retention of the Kafka partition may expire, which leads to data loss.

What I'm doing:

  1. adding TimeProgress to the result of show routine load.
    The TimestampProgress denotes the latest partition timestamp of the consumed message.

  2. adding FE config routine_load_unstable_threshold_second.
    When the time latency is more than this config value, the job would be set as UNSTABLE state.
    In this state, the routine load job would be scheduled continuously, and the ReasonOfChangeState would be set.

Fixes #35296

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:

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

@rickif
Copy link
Contributor Author

rickif commented Dec 1, 2023

@Mergifyio rebase

Copy link
Contributor

mergify bot commented Dec 1, 2023

rebase

✅ Branch has been successfully rebased

@rickif rickif changed the title [Feature] Adds timestamp progress to routine load [Feature] Adds routine_load_unstable_threshold_second Dec 5, 2023
Signed-off-by: ricky <rickif@qq.com>
Signed-off-by: ricky <rickif@qq.com>
Signed-off-by: ricky <rickif@qq.com>
Signed-off-by: ricky <rickif@qq.com>
Signed-off-by: ricky <rickif@qq.com>
Signed-off-by: ricky <rickif@qq.com>
Signed-off-by: ricky <rickif@qq.com>
…TxnCommitAttachment.java

Co-authored-by: wyb <wybb86@gmail.com>
Signed-off-by: ricky <rickif@qq.com>
Copy link

sonarcloud bot commented Dec 13, 2023

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

5 New issues
0 Security Hotspots
0.0% Coverage on New Code
2.5% Duplication on New Code

See analysis details on SonarCloud

Copy link

[FE Incremental Coverage Report]

pass : 57 / 66 (86.36%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/load/routineload/RoutineLoadTaskScheduler.java 0 2 00.00% [193, 198]
🔵 com/starrocks/load/routineload/PulsarRoutineLoadJob.java 0 3 00.00% [293, 294, 300]
🔵 com/starrocks/load/routineload/PulsarProgress.java 0 1 00.00% [129]
🔵 com/starrocks/load/routineload/RLTaskTxnCommitAttachment.java 5 6 83.33% [94]
🔵 com/starrocks/load/routineload/KafkaRoutineLoadJob.java 19 20 95.00% [349]
🔵 com/starrocks/load/routineload/RoutineLoadJob.java 26 27 96.30% [1990]
🔵 com/starrocks/load/routineload/KafkaProgress.java 3 3 100.00% []
🔵 com/starrocks/common/Config.java 1 1 100.00% []
🔵 com/starrocks/sql/ast/ShowRoutineLoadStmt.java 1 1 100.00% []
🔵 com/starrocks/common/InternalErrorCode.java 2 2 100.00% []

Copy link

[BE Incremental Coverage Report]

fail : 0 / 9 (00.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 src/runtime/routine_load/data_consumer_group.cpp 0 8 00.00% [120, 168, 215, 216, 217, 229, 230, 231]
🔵 src/runtime/stream_load/stream_load_executor.cpp 0 1 00.00% [463]

rickif added a commit to rickif/starrocks that referenced this pull request Dec 13, 2023
@meegoo meegoo enabled auto-merge (squash) December 13, 2023 18:50
@meegoo meegoo merged commit 4c9756f into StarRocks:main Dec 14, 2023
40 of 45 checks passed
@rickif rickif deleted the feat/timestamp-progress branch December 14, 2023 02:01
@rickif
Copy link
Contributor Author

rickif commented Dec 14, 2023

@Mergifyio backport branch-3.2 branch-3.1 branch-3.0 branch-2.5

Copy link
Contributor

mergify bot commented Dec 14, 2023

backport branch-3.2 branch-3.1 branch-3.0 branch-2.5

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Dec 14, 2023
Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
(cherry picked from commit 4c9756f)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/common/Config.java
#	fe/fe-core/src/main/java/com/starrocks/load/routineload/RoutineLoadJob.java
#	fe/fe-core/src/test/java/com/starrocks/analysis/ShowRoutineLoadStmtTest.java
#	fe/fe-core/src/test/java/com/starrocks/load/routineload/RoutineLoadJobTest.java
mergify bot pushed a commit that referenced this pull request Dec 14, 2023
Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
(cherry picked from commit 4c9756f)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/common/Config.java
#	fe/fe-core/src/main/java/com/starrocks/load/routineload/RoutineLoadJob.java
#	fe/fe-core/src/test/java/com/starrocks/analysis/ShowRoutineLoadStmtTest.java
#	fe/fe-core/src/test/java/com/starrocks/load/routineload/RoutineLoadJobTest.java
mergify bot pushed a commit that referenced this pull request Dec 14, 2023
Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
(cherry picked from commit 4c9756f)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/common/Config.java
#	fe/fe-core/src/main/java/com/starrocks/load/routineload/RoutineLoadJob.java
#	fe/fe-core/src/test/java/com/starrocks/analysis/ShowRoutineLoadStmtTest.java
#	fe/fe-core/src/test/java/com/starrocks/load/routineload/RoutineLoadJobTest.java
mergify bot pushed a commit that referenced this pull request Dec 14, 2023
Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
(cherry picked from commit 4c9756f)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/common/Config.java
#	fe/fe-core/src/main/java/com/starrocks/load/routineload/RoutineLoadJob.java
#	fe/fe-core/src/test/java/com/starrocks/analysis/ShowRoutineLoadStmtTest.java
#	fe/fe-core/src/test/java/com/starrocks/load/routineload/RoutineLoadJobTest.java
rickif added a commit to rickif/starrocks that referenced this pull request Dec 14, 2023
Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
rickif added a commit to rickif/starrocks that referenced this pull request Dec 14, 2023
Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
rickif added a commit to rickif/starrocks that referenced this pull request Dec 14, 2023
Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
rickif added a commit to rickif/starrocks that referenced this pull request Dec 14, 2023
Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
rickif added a commit to rickif/starrocks that referenced this pull request Dec 14, 2023
Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
wyb added a commit that referenced this pull request Dec 14, 2023
… (branch-2.5) (#37010)

Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
wyb added a commit that referenced this pull request Dec 14, 2023
… (branch-3.0) (#37009)

Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
wanpengfei-git pushed a commit that referenced this pull request Dec 15, 2023
… (branch-3.1) (#37008)

Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
andyziye pushed a commit that referenced this pull request Dec 21, 2023
… (branch-3.2) (#37007)

Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
Zhangg7723 pushed a commit to Zhangg7723/starrocks that referenced this pull request Dec 26, 2023
Signed-off-by: ricky <rickif@qq.com>
Co-authored-by: wyb <wybb86@gmail.com>
Signed-off-by: 张敢 <zhanggan@deepexi.com>
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.

Setting routine load paused after a period of sustained failure
5 participants