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

flashback: fix realtikvtest/flashbacktest test cases #52899

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

Defined2014
Copy link
Contributor

@Defined2014 Defined2014 commented Apr 26, 2024

What problem does this PR solve?

Issue Number: close #52898

Problem Summary: After #52285, flashbacktest alwayws failed with error info like

[r="assert failed, schemaID should not be 0, please set it when creating the event"]
[stack="[github.com/pingcap/tidb/pkg/util.Recover](http://github.com/pingcap/tidb/pkg/util.Recover)
	/home/genius/project/src/[github.com/pingcap/tidb/pkg/util/misc.go:118](http://github.com/pingcap/tidb/pkg/util/misc.go:118)
runtime.gopanic
	/home/genius/project/go/src/runtime/panic.go:914
[github.com/pingcap/tidb/pkg/util/intest.doPanic](http://github.com/pingcap/tidb/pkg/util/intest.doPanic)
	/home/genius/project/src/[github.com/pingcap/tidb/pkg/util/intest/assert.go:59](http://github.com/pingcap/tidb/pkg/util/intest/assert.go:59)
[github.com/pingcap/tidb/pkg/util/intest.Assert](http://github.com/pingcap/tidb/pkg/util/intest.Assert)
	/home/genius/project/src/[github.com/pingcap/tidb/pkg/util/intest/assert.go:27](http://github.com/pingcap/tidb/pkg/util/intest/assert.go:27)
[github.com/pingcap/tidb/pkg/statistics/handle/util.(*DDLEvent).IsMemOrSysDB](http://github.com/pingcap/tidb/pkg/statistics/handle/util.(*DDLEvent).IsMemOrSysDB)
	/home/genius/project/src/[github.com/pingcap/tidb/pkg/statistics/handle/util/ddl_event.go:51](http://github.com/pingcap/tidb/pkg/statistics/handle/util/ddl_event.go:51)
[github.com/pingcap/tidb/pkg/statistics/handle/ddl.(*ddlHandlerImpl).HandleDDLEvent](http://github.com/pingcap/tidb/pkg/statistics/handle/ddl.(*ddlHandlerImpl).HandleDDLEvent)
	/home/genius/project/src/[github.com/pingcap/tidb/pkg/statistics/handle/ddl/ddl.go:58](http://github.com/pingcap/tidb/pkg/statistics/handle/ddl/ddl.go:58)
[github.com/pingcap/tidb/pkg/domain.(*Domain).updateStatsWorker](http://github.com/pingcap/tidb/pkg/domain.(*Domain).updateStatsWorker)
	/home/genius/project/src/[github.com/pingcap/tidb/pkg/domain/domain.go:2415](http://github.com/pingcap/tidb/pkg/domain/domain.go:2415)
[github.com/pingcap/tidb/pkg/domain.(*Domain).UpdateTableStatsLoop.func3](http://github.com/pingcap/tidb/pkg/domain.(*Domain).UpdateTableStatsLoop.func3)
	/home/genius/project/src/[github.com/pingcap/tidb/pkg/domain/domain.go:2235](http://github.com/pingcap/tidb/pkg/domain/domain.go:2235)
[github.com/pingcap/tidb/pkg/util.(*WaitGroupEnhancedWrapper).Run.func1](http://github.com/pingcap/tidb/pkg/util.(*WaitGroupEnhancedWrapper).Run.func1)
	/home/genius/project/src/[github.com/pingcap/tidb/pkg/util/wait_group_wrapper.go:99](http://github.com/pingcap/tidb/pkg/util/wait_group_wrapper.go:99)"]

What changed and how does it work?

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 sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 26, 2024
Copy link

tiprow bot commented Apr 26, 2024

Hi @Defined2014. 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.

@Defined2014
Copy link
Contributor Author

/test fast_test_tiprow

Copy link

ti-chi-bot bot commented Apr 26, 2024

@Defined2014: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pull-br-integration-test
  • /test pull-integration-ddl-test
  • /test pull-lightning-integration-test
  • /test pull-mysql-client-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test canary-notify-when-compatibility-sections-changed
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-integration-nodejs-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test
  • pingcap/tidb/pull_integration_ddl_test
  • pingcap/tidb/pull_mysql_client_test

In response to this:

/test fast_test_tiprow

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 Apr 26, 2024

Codecov Report

Attention: Patch coverage is 84.21053% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 55.9040%. Comparing base (e8c397f) to head (3b70a81).
Report is 6 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #52899         +/-   ##
=================================================
- Coverage   72.4341%   55.9040%   -16.5302%     
=================================================
  Files          1481       1587        +106     
  Lines        428353     594129     +165776     
=================================================
+ Hits         310274     332142      +21868     
- Misses        98884     239046     +140162     
- Partials      19195      22941       +3746     
Flag Coverage Δ
integration 36.6962% <21.0526%> (?)
unit 71.2116% <84.2105%> (-0.1068%) ⬇️

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

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

@Defined2014 Defined2014 added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 26, 2024
Copy link

ti-chi-bot bot commented Apr 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Apr 26, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-26 02:50:58.198748501 +0000 UTC m=+315014.938651410: ☑️ agreed by tiancaiamao.
  • 2024-04-26 03:13:29.686268048 +0000 UTC m=+316366.426170961: ☑️ agreed by hawkingrei.

@hi-rustin
Copy link
Member

I'm OK to merge this PR. But I guess it is better to ignore those system ddls in Sender(DDL moudle) side. It would help us avoid this kind of bug happen again and avoid pass schema id to every event. I am on the holiday and I will be back next month. Perhaps we can merge this one and I will try to improve it after I get back.

@Defined2014
Copy link
Contributor Author

I'm OK to merge this PR. But I guess it is better to ignore those system ddls in Sender(DDL moudle) side. It would help us avoid this kind of bug happen again and avoid pass schema id to every event. I am on the holiday and I will be back next month. Perhaps we can merge this one and I will try to improve it after I get back.

Now only the required ddl will send the event. Flashback sends this event to update the ts of the stats table, so it has nothing to do with the schema. @hi-rustin

@Defined2014
Copy link
Contributor Author

/unhold

@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 Apr 26, 2024
@ti-chi-bot ti-chi-bot bot merged commit 58bfd1c into pingcap:master Apr 26, 2024
23 checks passed
@hi-rustin
Copy link
Member

I'm OK to merge this PR. But I guess it is better to ignore those system ddls in Sender(DDL moudle) side. It would help us avoid this kind of bug happen again and avoid pass schema id to every event. I am on the holiday and I will be back next month. Perhaps we can merge this one and I will try to improve it after I get back.

Now only the required ddl will send the event. Flashback sends this event to update the ts of the stats table, so it has nothing to do with the schema. @hi-rustin

Got it. I misunderstood it. Thank you.

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 sig/planner SIG: Planner 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.

realtikvtest/flashbacktest always failed
4 participants