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

tests: Fix unstable test alter_pk (#8917) #8995

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #8917

What problem does this PR solve?

Issue Number: close #8916

Problem Summary:

After executing alter table test.t add primary key new_pk(a,b,c), the table schema is not synced to the latest one when reading from tiflash. Because casting from nullable to not null can be automatically done in the DeltaMergeStore level. So sometime the integration test is not stable. Introduced by #7630

[2024-04-09T07:08:15.819Z] fullstack-test2/ddl/alter_pk.test: Running
[2024-04-09T07:08:24.856Z]   File: fullstack-test2/ddl/alter_pk.test
[2024-04-09T07:08:24.856Z]   Error line: 35
[2024-04-09T07:08:24.856Z]   Error: DBGInvoke query_mapped('desc \$d.\$t', test, t)
[2024-04-09T07:08:24.856Z]   Result:
[2024-04-09T07:08:24.856Z]     ┌─name────────┬─type────────────┬─default_type─┬─default_expression─┐
[2024-04-09T07:08:24.856Z]     │ a           │ Nullable(Int32) │              │                    │
[2024-04-09T07:08:24.856Z]     │ b           │ Nullable(Int32) │              │                    │
[2024-04-09T07:08:24.856Z]     │ c           │ Nullable(Int32) │              │                    │
[2024-04-09T07:08:24.856Z]     │ d           │ Nullable(Int32) │              │                    │
[2024-04-09T07:08:24.856Z]     │ e           │ Nullable(Int32) │              │                    │
[2024-04-09T07:08:24.856Z]     │ f           │ Nullable(Int32) │              │                    │
[2024-04-09T07:08:24.856Z]     │ _tidb_rowid │ Int64           │              │                    │
[2024-04-09T07:08:24.856Z]     └─────────────┴─────────────────┴──────────────┴────────────────────┘
[2024-04-09T07:08:24.856Z]   Expected:
[2024-04-09T07:08:24.856Z]     ┌─name────────┬─type────────────┬─default_type─┬─default_expression─┐
[2024-04-09T07:08:24.856Z]     │ a           │ Int32           │              │                    │
[2024-04-09T07:08:24.856Z]     │ b           │ Int32           │              │                    │
[2024-04-09T07:08:24.856Z]     │ c           │ Int32           │              │                    │
[2024-04-09T07:08:24.856Z]     │ d           │ Nullable(Int32) │              │                    │
[2024-04-09T07:08:24.856Z]     │ e           │ Nullable(Int32) │              │                    │
[2024-04-09T07:08:24.856Z]     │ f           │ Nullable(Int32) │              │                    │
[2024-04-09T07:08:24.856Z]     │ _tidb_rowid │ Int64           │              │                    │
[2024-04-09T07:08:24.856Z]     └─────────────┴─────────────────┴──────────────┴────────────────────┘

What is changed and how it works?

Add DBGInvoke __refresh_table_schema(test, t2); to sync the latest schema of table

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 added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/cherry-pick-for-release-7.5 This PR is cherry-picked to release-7.5 from a source PR. labels Apr 26, 2024
@ti-chi-bot ti-chi-bot mentioned this pull request Apr 26, 2024
12 tasks
@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Apr 26, 2024
@JaySon-Huang
Copy link
Contributor

/run-all-tests

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Apr 26, 2024
@ti-chi-bot ti-chi-bot bot added the lgtm label May 7, 2024
Copy link
Contributor

ti-chi-bot bot commented May 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, 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 [JaySon-Huang,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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label May 7, 2024
Copy link
Contributor

ti-chi-bot bot commented May 7, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-26 07:08:46.428664455 +0000 UTC m=+330483.168567367: ☑️ agreed by JaySon-Huang.
  • 2024-05-07 08:51:28.275776096 +0000 UTC m=+952042.032911671: ☑️ agreed by Lloyd-Pottiger.

Copy link
Contributor

ti-chi-bot bot commented May 7, 2024

@ti-chi-bot: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

trigger some heavy tests which will not run always when PR updated.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot merged commit 5b44361 into pingcap:release-7.5 May 7, 2024
5 checks passed
JaySon-Huang pushed a commit to JaySon-Huang/tiflash that referenced this pull request Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/cherry-pick-for-release-7.5 This PR is cherry-picked to release-7.5 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants