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

*: don't handle live updates of column size #58596

Merged
merged 10 commits into from
Jan 6, 2025

Conversation

winoros
Copy link
Member

@winoros winoros commented Dec 28, 2024

What problem does this PR solve?

Issue Number: close #58595

Problem Summary:

What changed and how does it work?

Just as the issue said. We dropped the maintenance of the column size updates during various DML statements.

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.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

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. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. sig/planner SIG: Planner labels Dec 28, 2024
Copy link

codecov bot commented Dec 28, 2024

Codecov Report

Attention: Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.4767%. Comparing base (be6396c) to head (ad182af).
Report is 78 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58596        +/-   ##
================================================
+ Coverage   73.5326%   74.4767%   +0.9440%     
================================================
  Files          1680       1711        +31     
  Lines        464728     481843     +17115     
================================================
+ Hits         341727     358861     +17134     
+ Misses       102158     101381       -777     
- Partials      20843      21601       +758     
Flag Coverage Δ
integration 46.3054% <44.4444%> (?)
unit 73.0329% <96.2963%> (+0.7591%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.7300% <ø> (-0.0385%) ⬇️

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 29, 2024
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 29, 2024
@winoros winoros force-pushed the remove-cols-live-updates branch from 297fb21 to 111a58d Compare December 29, 2024 20:24
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 30, 2024
Copy link

ti-chi-bot bot commented Dec 30, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-29 01:13:24.15158243 +0000 UTC m=+226539.507586969: ☑️ agreed by lance6716.
  • 2024-12-30 02:13:22.48680886 +0000 UTC m=+316537.842813398: ☑️ agreed by qw4990.

Copy link
Member

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

/hold

Thanks!

func (ctx *litTableMutateContext) UpdatePhysicalTableDelta(
physicalTableID int64, _ int64,
_ int64, cols variable.DeltaCols,
func (*litTableMutateContext) UpdatePhysicalTableDelta(
Copy link
Member

@Rustin170506 Rustin170506 Dec 30, 2024

Choose a reason for hiding this comment

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

Can we even delete this function? I believe we can delete the interface as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

The interface MutateContext will be used in the normal write path. We cannot delete the MutateContext interface.
We can only let the litTableMutateContext not impl the interface StatisticsSupport and return a nil for its GetStatisticsSupport and add an intest.Assert(false) inside it.

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 30, 2024
@time-and-fate
Copy link
Member

I think the changes in the latest commit are incorrect.

@winoros winoros force-pushed the remove-cols-live-updates branch from b63ca1d to 1805653 Compare December 30, 2024 17:36
@winoros
Copy link
Member Author

winoros commented Dec 30, 2024

some tests like TestReplaceConflictOneUniqueKey failed if we cleaned the litTableMutateContext.
Reverted them.

Copy link
Member

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

Thanks! :shipit:

require.Equal(t, map[int64]int64{1: 2, 3: 9, 4: 3}, tblCtx.GetColumnSize(123))
// test gets a non-existed table
require.Empty(t, tblCtx.GetColumnSize(456))
stats.UpdatePhysicalTableDelta(123, 5, 2)
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we can delete them at all.

Copy link

ti-chi-bot bot commented Jan 5, 2025

@winoros: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-unit-test-ddlv1 b63ca1d link true /test pull-unit-test-ddlv1

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@winoros
Copy link
Member Author

winoros commented Jan 6, 2025

/unhold
/retest

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 6, 2025
Copy link

@yudongusa yudongusa left a comment

Choose a reason for hiding this comment

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

@winoros @songrijie We need to make this change clearly stated in the document as well as communication with users.

Copy link

ti-chi-bot bot commented Jan 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, lance6716, qw4990, Rustin170506, yudongusa

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:

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 the approved label Jan 6, 2025
@ti-chi-bot ti-chi-bot bot merged commit bf939fa into pingcap:master Jan 6, 2025
25 checks passed
breezewish added a commit that referenced this pull request Jan 8, 2025
…long-vector

* commit '510d0037b18f258f505abc6cf13a8128563e9359':
  *: upgrade pd client to make sure tso client initiate successfully (#58752)
  ttl, test: scale TTL workers during the fault tests (#58750)
  planner: improve warning messages for unsupported HASH_JOIN hints (#58646)
  planner: prealloc the slices in the SplitCorColAccessCondFromFilters (#58785)
  ddl: supports non-unique global index (#58678)
  util/stmtsummary: add the network traffic related fields (#58101)
  var: enable `pd_enable_follower_handle_region` as default (#58385)
  statistics: refactor stats meta handling to use DeltaUpdate for multi-table support (#58657)
  parser: move 'model' to 'ast' pkg (#58704)
  statistics: add recover to protect background task (#58739)
  disttask: cancel subtask context if scheduled away (#58615)
  *: don't handle live updates of column size (#58596)
  *: fix a bug for default_authentication_plugin (2) (#58723)
  dupdetect: gRPC cancel should trigger retry (#58542)
  *: fix a bug for default_authentication_plugin (#57391)
  distsql: Fix backoff execution info inaccurate issue (#58707)
@Rustin170506 Rustin170506 added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Jan 13, 2025
@ti-chi-bot
Copy link
Member

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

Rustin170506 pushed a commit to Rustin170506/tidb that referenced this pull request Jan 16, 2025
Rustin170506 pushed a commit to Rustin170506/tidb that referenced this pull request Jan 16, 2025
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-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. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop live updates of the column size
8 participants