Skip to content

Conversation

MinatoWu
Copy link
Contributor

What this PR does:
with :#672 Fix active xa rollback failure and added error message judgment
Which issue(s) this PR fixes:

Fixes #
#708
Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@github-actions github-actions bot added bug Something isn't working enhancement New feature or request module/xa coding and removed bug Something isn't working enhancement New feature or request module/xa labels Aug 16, 2025
@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2025

Codecov Report

❌ Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@33fa891). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pkg/datasource/sql/conn_xa.go 53.84% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master     #875   +/-   ##
=========================================
  Coverage          ?   38.03%           
=========================================
  Files             ?      186           
  Lines             ?    11243           
  Branches          ?        0           
=========================================
  Hits              ?     4276           
  Misses            ?     6542           
  Partials          ?      425           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot added bug Something isn't working enhancement New feature or request module/xa labels Aug 16, 2025

errMsg := err.Error()
// Check for XAER_RMFAIL error with "already ended" message
if strings.Contains(errMsg, "XAER_RMFAIL") && strings.Contains(errMsg, "already ended") {
Copy link
Contributor

Choose a reason for hiding this comment

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

The string matching approach in isXAER_RMFAILAlreadyEnded() is fragile
Consider using error codes or types instead of string matching
Different database vendors might format error messages differently

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I'm trying to reproduce him and add constant Err code judgment.

Copy link
Contributor

@Code-Fight Code-Fight left a comment

Choose a reason for hiding this comment

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

LGTM

@Code-Fight
Copy link
Contributor

If we can improve the unit test coverage, that would be even better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working coding enhancement New feature or request module/xa
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants