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

*: Refine MutableSupport and DeltaMergeDefines #9746

Merged
merged 5 commits into from
Dec 30, 2024

Conversation

JinheLin
Copy link
Contributor

@JinheLin JinheLin commented Dec 27, 2024

What problem does this PR solve?

Issue Number: ref #9673

Problem Summary:

After #9608, the storage format of strings depends on STORAGE_FORMAT_CURRENT.

But MutableSupport::tidb_pk_column_string_type is a static variable that is only initialized once at program startup. Its value depends on the initialization value of STORAGE_FORMAT_CURRENT in the code, and modifying the configuration will not change it.

And in order to test different storage formats, some unit-tests will dynamically modify the configuration of storage formats.

In summary, we need to dynamically obtain the object of DataTypeString based on the value of STORAGE_FORMAT_CURRENT.

What is changed and how it works?

  • Dynamically obtain the object of DataTypeString based on the value of STORAGE_FORMAT_CURRENTin

    • MutableSupport.cpp - MutSup::getTiDBPkColumnStringType()
    • DeltaMergeDefines.cpp - getExtraStringHandleColumnDefine()
  • Also this PR refine code in MutableSupport.* and DeltaMergeDefines.*.

    • Remove some useless.
    • Remove some deplicated.
    • Remove some macros.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 27, 2024
@JinheLin JinheLin changed the title WIP: *: Refine MutableSupport and DeltaMergeDefines *: Refine MutableSupport and DeltaMergeDefines Dec 27, 2024
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 27, 2024
dbms/src/Storages/MutableSupport.h Outdated Show resolved Hide resolved
dbms/src/Storages/MutableSupport.h Outdated Show resolved Hide resolved
dbms/src/Storages/MutableSupport.h Outdated Show resolved Hide resolved
@JinheLin JinheLin force-pushed the refine_internal_cols branch from e263f5a to 46242bc Compare December 30, 2024 03:14
@JinheLin
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 30, 2024
Copy link
Member

@CalvinNeo CalvinNeo left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

ti-chi-bot bot commented Dec 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CalvinNeo, Lloyd-Pottiger

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 [CalvinNeo,Lloyd-Pottiger]

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 Dec 30, 2024
Copy link
Contributor

ti-chi-bot bot commented Dec 30, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-30 05:58:05.155044149 +0000 UTC m=+330020.511048687: ☑️ agreed by Lloyd-Pottiger.
  • 2024-12-30 06:20:04.383440988 +0000 UTC m=+331339.739445528: ☑️ agreed by CalvinNeo.

@ti-chi-bot ti-chi-bot bot merged commit c807718 into pingcap:master Dec 30, 2024
5 checks passed
yibin87 pushed a commit to yibin87/tiflash that referenced this pull request Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. 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.

4 participants