Skip to content

feat: add SQL Server support for terminate execution#3279

Merged
BugsGuru merged 3 commits intomainfrom
sqle/feat-2778
Apr 28, 2026
Merged

feat: add SQL Server support for terminate execution#3279
BugsGuru merged 3 commits intomainfrom
sqle/feat-2778

Conversation

@actiontech-bot
Copy link
Copy Markdown
Member

Summary

  • Add SQL Server error pattern matching in isConnectionTerminatedError() for three error types: "connection is broken", "Timeout expired", and "session is in the kill state"
  • Add comprehensive test cases (9 positive, 2 negative) covering all SQL Server gRPC wrapper formats (exec failed, exec batch failed, tx failed)

Fixes actiontech/sqle-ee#2778

Test plan

  • Unit tests for isConnectionTerminatedError() pass (11 new SQL Server cases)
  • Existing MySQL and PostgreSQL test cases still pass (no regression)
  • Integration test: SQL Server 2017 terminate execution flow
  • Integration test: SQL Server 2022 terminate execution flow



Add "connection is broken" pattern to detect SQL Server connection
terminated by KILL command. The SqlException from C# plugin is wrapped
through gRPC and contains this substring.

Add 5 test cases (3 positive, 2 negative) for SQL Server scenarios.
When a SQL Server connection is KILLed during execution, the actual error
returned via the C# gRPC plugin is "Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not responding."
rather than "connection is broken". Add this pattern to
isConnectionTerminatedError() so terminated SQL is correctly identified.

Fixes #2778
…#2778

SQL Server KILL causes the session to enter a kill state. Subsequent
operations return "Cannot continue the execution because the session
is in the kill state." which was not matched, leaving the task status
as Execute failed instead of Termination success.

Add strings.Contains match for "session is in the kill state" and
corresponding test cases covering exec failed, exec batch failed,
and tx failed gRPC wrappers.
@BugsGuru BugsGuru merged commit e026319 into main Apr 28, 2026
4 checks passed
@BugsGuru BugsGuru deleted the sqle/feat-2778 branch April 28, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants