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

[BugFix] Fix table load metrics missing for transaction load #44991

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kaijianding
Copy link
Contributor

@kaijianding kaijianding commented Apr 29, 2024

Why I'm doing:

A transaction stream load using prepare interface, the table metrics starrocks_fe_table_load_rows and starrocks_fe_table_load_bytes are missing.

What I'm doing:

Update table metrics in GlobalTransactionMgr.commitPreparedTransaction() which is called after prepare

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.

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

@kaijianding kaijianding requested a review from a team as a code owner April 29, 2024 14:00
@github-actions github-actions bot added the 3.3 label Apr 29, 2024
@kaijianding kaijianding force-pushed the txn_load_table_metrics branch 2 times, most recently from bdc73e2 to 993eafc Compare April 30, 2024 07:41
Copy link

@wyb wyb requested review from wyb and HangyuanLiu May 8, 2024 07:53
@kaijianding
Copy link
Contributor Author

@wyb could you review this pr?

meegoo
meegoo previously approved these changes May 31, 2024
return;
}
long tableId = transactionState.getTableIdList().get(0);
ManualLoadTxnCommitAttachment streamAttachment = (ManualLoadTxnCommitAttachment) attachment;
Copy link
Contributor

Choose a reason for hiding this comment

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

also need to process StreamLoadTxnCommitAttachment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't find StreamLoadTxnCommitAttachment from any my production env's fe log, so I don't think I can handle StreamLoadTxnCommitAttachment here correctly.
Maybe someone else uses StreamLoadTxnCommitAttachment can start another pr to fix the metrics.

Currently, only ManualLoadTxnCommitAttachment is handled and is just working fine.

@zenoyang
Copy link
Contributor

We also encountered the same problem. Is this PR still maintained? If not, I will resubmit a PR to fix this problem. @wyb @kaijianding

@kaijianding
Copy link
Contributor Author

We also encountered the same problem. Is this PR still maintained? If not, I will resubmit a PR to fix this problem. @wyb @kaijianding

this pr is working fine in our production env.
I will continue this pr

@kaijianding kaijianding force-pushed the txn_load_table_metrics branch 2 times, most recently from 39c5982 to c959c0c Compare January 22, 2025 03:24
@kaijianding kaijianding force-pushed the txn_load_table_metrics branch 2 times, most recently from 6988b3a to d4f2a76 Compare February 12, 2025 02:14
@kaijianding kaijianding force-pushed the txn_load_table_metrics branch from d4f2a76 to 87a52f6 Compare February 12, 2025 02:27
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 16 / 18 (88.89%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/service/FrontendServiceImpl.java 0 1 00.00% [1465]
🔵 com/starrocks/transaction/DatabaseTransactionMgr.java 16 17 94.12% [2071]

Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants