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

executor: skip TemporaryTableNoNetwork unit test under infoschema v2 #51709

Merged
merged 1 commit into from Mar 12, 2024

Conversation

tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #50959

Problem Summary:

What changed and how does it work?

In TemporaryTableNoNetwork unit test, there is a failpoint assuming that temporary table related operations would not cause network visiting. That's true for infoschema v1.

When using infoschema v2, the API like SchemaTables need to visit network to list tables, and also API like TableByID may miss table cache and requires reloading ...
So TemporaryTableNoNetwork can not work under infoschema v2, skip those tests.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
diff --git a/pkg/sessionctx/variable/tidb_vars.go b/pkg/sessionctx/variable/tidb_vars.go
index d655384bfb..7e0bef66e7 100644
--- a/pkg/sessionctx/variable/tidb_vars.go
+++ b/pkg/sessionctx/variable/tidb_vars.go
@@ -1482,7 +1482,7 @@ const (
        DefTiDBIdleTransactionTimeout                     = 0
        DefEnableParallelSort                             = false
        DefTiDBTxnEntrySizeLimit                          = 0
-       DefTiDBSchemaCacheSize                            = 0
+       DefTiDBSchemaCacheSize                            = 1024
        DefTiDBLowResolutionTSOUpdateInterval             = 2000
        DefTiDBDMLType                                    = "STANDARD"
 )
make ut X='run executor' 1>a.log 2>b.log
grep FAIL a.log |wc -l

This can fix 5 test cases, FAILED cases reduce from 20 to 15.

And also test the temporary table integration test with infoschema v2 manually:

diff --git a/tests/integrationtest/t/session/temporary_table.test b/tests/integrationtest/t/session/temporary_table.test
index c191afe167..41c5a0e0e5 100644
--- a/tests/integrationtest/t/session/temporary_table.test
+++ b/tests/integrationtest/t/session/temporary_table.test
@@ -1,3 +1,5 @@
+set @@global.tidb_schema_cache_size = 1024;

Check this work as expected:

cd tests/integrationtest 
./run-tests.sh -r session/temporary_table
  • 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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 12, 2024
Copy link

tiprow bot commented Mar 12, 2024

Hi @tiancaiamao. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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/test-infra repository.

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Merging #51709 (4f2bf68) into master (ccbab5e) will increase coverage by 1.8439%.
Report is 8 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51709        +/-   ##
================================================
+ Coverage   70.7455%   72.5894%   +1.8439%     
================================================
  Files          1473       1474         +1     
  Lines        436996     439813      +2817     
================================================
+ Hits         309155     319258     +10103     
+ Misses       108515     100494      -8021     
- Partials      19326      20061       +735     
Flag Coverage Δ
integration 48.8320% <ø> (?)
unit 70.4873% <ø> (-0.0761%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.1789% <ø> (+5.2932%) ⬆️

@tiancaiamao
Copy link
Contributor Author

/test pull-integration-ddl-test

Copy link

tiprow bot commented Mar 12, 2024

@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test pull-integration-ddl-test

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/test-infra repository.

Copy link

ti-chi-bot bot commented Mar 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, ywqzzy

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

Copy link

ti-chi-bot bot commented Mar 12, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-12 12:15:37.399231161 +0000 UTC m=+774164.421477549: ☑️ agreed by ywqzzy.
  • 2024-03-12 13:59:51.67086359 +0000 UTC m=+780418.693109978: ☑️ agreed by hawkingrei.

@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot merged commit 05a63f7 into pingcap:master Mar 12, 2024
23 checks passed
@tiancaiamao tiancaiamao deleted the temporary-table branch March 13, 2024 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test release-note-none size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants