Skip to content

Conversation

YangKeao
Copy link
Member

What problem does this PR solve?

Issue Number: close #59963, close #59976

Problem Summary:

  1. The row container will not be closed if the exclusion panic.
  2. The results and cursor will not be reset if there is an error in cc.flush.

What changed and how does it work?

  1. Set the row container of stmt right after creating it. Therefore, it can be closed after closing the connection.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 10, 2025
@YangKeao
Copy link
Member Author

/check-issue-triage-complete

Copy link
Contributor

@Defined2014 Defined2014 left a comment

Choose a reason for hiding this comment

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

Please update bazel

stmt.StoreRowContainer(rowContainer)
defer func() {
if err != nil {
// if the execution panic, it'll not reach this branch. The `rowContainer` will be released in the `stmt.Close`.
Copy link
Contributor

Choose a reason for hiding this comment

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

The comments it a littile dup with L390.

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 10, 2025
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.4891%. Comparing base (ae830dc) to head (07ae424).
Report is 6 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59985        +/-   ##
================================================
+ Coverage   73.0798%   73.4891%   +0.4092%     
================================================
  Files          1702       1702                
  Lines        470061     470483       +422     
================================================
+ Hits         343520     345754      +2234     
+ Misses       105368     103534      -1834     
- Partials      21173      21195        +22     
Flag Coverage Δ
integration 42.7272% <0.0000%> (?)
unit 72.2850% <100.0000%> (-0.0054%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 47.2088% <ø> (-0.0028%) ⬇️
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@YangKeao
Copy link
Member Author

/retest

Copy link

ti-chi-bot bot commented Mar 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, lcwangchao

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Defined2014,lcwangchao]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 10, 2025
Copy link

ti-chi-bot bot commented Mar 10, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-03-10 08:14:59.308045079 +0000 UTC m=+170854.913573998: ☑️ agreed by Defined2014.
  • 2025-03-10 09:31:32.428070562 +0000 UTC m=+175448.033599490: ☑️ agreed by lcwangchao.

@ti-chi-bot ti-chi-bot bot merged commit dbf6a6e into pingcap:master Mar 10, 2025
24 checks passed
@YangKeao YangKeao added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Mar 11, 2025
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 11, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #59999.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 11, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #60000.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 11, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #60001.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 11, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #60002.
But this PR has conflicts, please resolve them!

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #60003.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TiDB panics when network failed when writeExecuteResultWithCursor failed spilling data didn't clean for cursor fetch
4 participants