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] Support insert timeout #50644

Merged
merged 8 commits into from
Nov 13, 2024
Merged

[Enhancement] Support insert timeout #50644

merged 8 commits into from
Nov 13, 2024

Conversation

wyb
Copy link
Contributor

@wyb wyb commented Sep 3, 2024

Why I'm doing:

insert and query use the same query_timeout session variable to control timeout.
but they need different default values, default query_timeout 300s is very small for insert.

What I'm doing:

add a new insert_timeout session variable for insert/update/delete and the default value is 14400s.

you can also set timeout in insert properties for the current insert sql, for example

insert into tbl properties("timeout" = "3600") select ...

if timeout property is not set, insert_timeout session variable will be used.

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
  • This is a backport pr

Bugfix cherry-pick branch check:

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

@wyb wyb requested review from a team as code owners September 3, 2024 15:05
@wyb wyb marked this pull request as draft September 3, 2024 15:05
@mergify mergify bot assigned wyb Sep 3, 2024
@wyb wyb marked this pull request as ready for review September 3, 2024 15:17
@wyb wyb force-pushed the ins_timeout branch 2 times, most recently from 10874fd to a76bca3 Compare September 17, 2024 02:48
@wyb wyb force-pushed the ins_timeout branch 2 times, most recently from 8d61a2c to 64d2634 Compare September 20, 2024 09:03
Copy link

sonarcloud bot commented Sep 20, 2024

@wyb wyb force-pushed the ins_timeout branch 5 times, most recently from 1ad4f77 to 3eaaffb Compare November 6, 2024 12:05
jaogoy
jaogoy previously approved these changes Nov 7, 2024
@wyb wyb force-pushed the ins_timeout branch 2 times, most recently from 1b84414 to 14a14f2 Compare November 8, 2024 07:14
LiShuMing
LiShuMing previously approved these changes Nov 8, 2024
meegoo
meegoo previously approved these changes Nov 10, 2024
gengjun-git
gengjun-git previously approved these changes Nov 11, 2024
Signed-off-by: wyb <[email protected]>
Copy link

sonarcloud bot commented Nov 12, 2024

Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 79 / 93 (84.95%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/scheduler/mv/MVMaintenanceJob.java 0 1 00.00% [270]
🔵 com/starrocks/server/GlobalStateMgr.java 0 1 00.00% [2384]
🔵 com/starrocks/qe/LeaderOpExecutor.java 1 3 33.33% [100, 108]
🔵 com/starrocks/sql/StatementPlanner.java 1 2 50.00% [540]
🔵 com/starrocks/scheduler/PartitionBasedMvRefreshProcessor.java 2 3 66.67% [586]
🔵 com/starrocks/sql/ast/DmlStmt.java 3 4 75.00% [71]
🔵 com/starrocks/qe/ResultReceiver.java 6 8 75.00% [151, 152]
🔵 com/starrocks/load/pipe/Pipe.java 4 5 80.00% [173]
🔵 com/starrocks/qe/StmtExecutor.java 18 22 81.82% [2356, 2358, 2364, 2365]
🔵 com/starrocks/qe/SessionVariable.java 4 4 100.00% []
🔵 com/starrocks/alter/OptimizeJobV2.java 1 1 100.00% []
🔵 com/starrocks/sql/analyzer/SetStmtAnalyzer.java 3 3 100.00% []
🔵 com/starrocks/qe/ShortCircuitHybridExecutor.java 1 1 100.00% []
🔵 com/starrocks/datacache/DataCacheSelectExecutor.java 1 1 100.00% []
🔵 com/starrocks/sql/analyzer/InsertAnalyzer.java 2 2 100.00% []
🔵 com/starrocks/sql/DeletePlanner.java 1 1 100.00% []
🔵 com/starrocks/alter/OnlineOptimizeJobV2.java 1 1 100.00% []
🔵 com/starrocks/common/ErrorCode.java 3 3 100.00% []
🔵 com/starrocks/statistic/StatisticUtils.java 1 1 100.00% []
🔵 com/starrocks/server/NodeMgr.java 1 1 100.00% []
🔵 com/starrocks/sql/UpdatePlanner.java 1 1 100.00% []
🔵 com/starrocks/qe/scheduler/dag/JobSpec.java 1 1 100.00% []
🔵 com/starrocks/qe/ConnectContext.java 15 15 100.00% []
🔵 com/starrocks/sql/analyzer/DeleteAnalyzer.java 1 1 100.00% []
🔵 com/starrocks/qe/DefaultCoordinator.java 2 2 100.00% []
🔵 com/starrocks/sql/analyzer/UpdateAnalyzer.java 1 1 100.00% []
🔵 com/starrocks/catalog/DictionaryMgr.java 1 1 100.00% []
🔵 com/starrocks/sql/ast/StatementBase.java 1 1 100.00% []
🔵 com/starrocks/sql/InsertPlanner.java 1 1 100.00% []
🔵 com/starrocks/sql/ast/CreateTableAsSelectStmt.java 1 1 100.00% []

Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@wyb wyb enabled auto-merge (squash) November 13, 2024 02:25
@wyb wyb merged commit b34abe9 into StarRocks:main Nov 13, 2024
56 checks passed
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.

6 participants