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

flaky test TestAlterAddConstraintStateChange3 #48123

Closed
Tracked by #41316
hawkingrei opened this issue Oct 31, 2023 · 3 comments · Fixed by #48131 or #53557
Closed
Tracked by #41316

flaky test TestAlterAddConstraintStateChange3 #48123

hawkingrei opened this issue Oct 31, 2023 · 3 comments · Fixed by #48131 or #53557
Labels
component/test severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@hawkingrei
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

     result.go:49: 
        	Error Trace:	pkg/testkit/result.go:49
        	            				pkg/ddl/constraint_test.go:247
        	Error:      	Not equal: 
        	            	expected: "[t CREATE TABLE `t` (\n  `a` int(11) DEFAULT NULL,\nCONSTRAINT `c3` CHECK ((`a` > 10))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin]\n"
        	            	actual  : "[t CREATE TABLE `t` (\n  `a` int(11) DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin]\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,4 +1,3 @@
        	            	 [t CREATE TABLE `t` (
        	            	-  `a` int(11) DEFAULT NULL,
        	            	-CONSTRAINT `c3` CHECK ((`a` > 10))
        	            	+  `a` int(11) DEFAULT NULL
        	            	 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin]
        	Test:       	TestAlterAddConstraintStateChange3
        	Messages:   	sql:show create table t, args:[] 

https://tiprow.hawkingrei.com/view/gs/pingcapprow/pr-logs/pull/pingcap_tidb/48096/tiprow_fast_test/1719170692164882432#1:build-log.txt%3A2614

4. What is your TiDB version? (Required)

@CbcWestwolf
Copy link
Member

/cc fzzf678

@jiyfhust
Copy link
Contributor

I can make a pr to fix it.

@D3Hunter
Copy link
Contributor

D3Hunter commented May 27, 2024

met it again in my branch, the reason is that we will enter OnJobUpdated twice for schema-state=public, once when job is in done and and once for synced state. if we start checking after first entrance, we might not see the correct schema as it might changed by the second entrance

    result.go:49: 
        	Error Trace:	pkg/testkit/result.go:49
        	            				pkg/ddl/constraint_test.go:244
        	Error:      	Not equal: 
        	            	expected: "[t CREATE TABLE `t` (\n  `a` int(11) DEFAULT NULL,\nCONSTRAINT `c3` CHECK ((`a` > 10))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin]\n"
        	            	actual  : "[t CREATE TABLE `t` (\n  `a` int(11) DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin]\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,4 +1,3 @@
        	            	 [t CREATE TABLE `t` (
        	            	-  `a` int(11) DEFAULT NULL,
        	            	-CONSTRAINT `c3` CHECK ((`a` > 10))
        	            	+  `a` int(11) DEFAULT NULL
        	            	 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin]
        	Test:       	TestAlterAddConstraintStateChange3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
4 participants