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] Return aborted reason when getting label/transaction state #54472

Merged
merged 4 commits into from
Dec 31, 2024

Conversation

banmoy
Copy link
Contributor

@banmoy banmoy commented Dec 29, 2024

Why I'm doing:

There are two interfaces to get the label/transaction state

  • HTTP get_label_state (http client -> FE)
  • Thrift getLoadTxnStatus (BE -> FE)

Currently the interfaces only return the TransactionStatus. But If the status is ABORTED, the caller also wants to know the reason. So also need to return the reason

What I'm doing:

  • for HTTP get_label_state, add reason field in the response json
  • for Thrift getLoadTxnStatus, add reason field in the response TGetLoadTxnStatusResult

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.4
    • 3.3
    • 3.2
    • 3.1
    • 3.0

@banmoy banmoy requested review from a team as code owners December 29, 2024 06:06
@wanpengfei-git wanpengfei-git requested a review from a team December 29, 2024 06:06
@mergify mergify bot assigned banmoy Dec 29, 2024
@github-actions github-actions bot added the 3.4 label Dec 29, 2024
@banmoy banmoy changed the title [Enhancement] Return transaction abort reason of HTTP get_load_state/Thrift getLoadTxnStatus [Enhancement] Return transaction abort reason for get_load_state(http)/getLoadTxnStatus(thrift) Dec 29, 2024
@banmoy banmoy changed the title [Enhancement] Return transaction abort reason for get_load_state(http)/getLoadTxnStatus(thrift) [Enhancement] Return transaction abort reason for http get_load_state and thrift getLoadTxnStatus Dec 29, 2024
@banmoy banmoy requested review from a team as code owners December 29, 2024 10:49
@wanpengfei-git wanpengfei-git requested a review from a team December 29, 2024 10:50
@wanpengfei-git wanpengfei-git removed the request for review from a team December 29, 2024 10:51
@banmoy banmoy changed the title [Enhancement] Return transaction abort reason for http get_load_state and thrift getLoadTxnStatus [Enhancement] Return transaction abort reason when getting label state Dec 30, 2024
@banmoy banmoy changed the title [Enhancement] Return transaction abort reason when getting label state [Enhancement] Return aborted reason when getting label state Dec 30, 2024
@banmoy banmoy changed the title [Enhancement] Return aborted reason when getting label state [Enhancement] Return aborted reason when getting label/transaction state Dec 30, 2024
@kevincai kevincai removed request for a team December 30, 2024 06:46
@kevincai kevincai removed request for a team December 30, 2024 06:46
@andyziye andyziye requested a review from a team December 30, 2024 06:59
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 23 / 25 (92.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/transaction/GlobalTransactionMgr.java 1 2 50.00% [224]
🔵 com/starrocks/transaction/TransactionStateSnapshot.java 6 7 85.71% [38]
🔵 com/starrocks/http/rest/GetStreamLoadState.java 5 5 100.00% []
🔵 com/starrocks/transaction/DatabaseTransactionMgr.java 6 6 100.00% []
🔵 com/starrocks/service/FrontendServiceImpl.java 4 4 100.00% []
🔵 com/starrocks/load/pipe/Pipe.java 1 1 100.00% []

Copy link

[BE Incremental Coverage Report]

pass : 1 / 1 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/runtime/batch_write/isomorphic_batch_write.cpp 1 1 100.00% []

@wyb wyb enabled auto-merge (squash) December 31, 2024 02:10
@wyb wyb merged commit 0bb3eeb into StarRocks:main Dec 31, 2024
47 of 49 checks passed
Copy link

@Mergifyio backport branch-3.4

@github-actions github-actions bot removed the 3.4 label Dec 31, 2024
Copy link
Contributor

mergify bot commented Dec 31, 2024

backport branch-3.4

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Dec 31, 2024
…ate (#54472)

Signed-off-by: PengFei Li <[email protected]>
(cherry picked from commit 0bb3eeb)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/transaction/GlobalTransactionMgr.java
banmoy added a commit to banmoy/starrocks that referenced this pull request Dec 31, 2024
banmoy added a commit to banmoy/starrocks that referenced this pull request Dec 31, 2024
gengjun-git pushed a commit that referenced this pull request Dec 31, 2024
gengjun-git pushed a commit that referenced this pull request Dec 31, 2024
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.

5 participants