This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new eb7a508d5e2 [fix](regression) Stabilize the double write schema change
case (#69459)
eb7a508d5e2 is described below
commit eb7a508d5e29bef12d616ea1084d1367b9e16354
Author: lihangyu <[email protected]>
AuthorDate: Fri Oct 23 18:25:08 2026 +0800
[fix](regression) Stabilize the double write schema change case (#69459)
### What problem does this PR solve?
Issue Number: close # (none)
Problem Summary:
`variant_p0/schema_change/test_double_write_when_schema_change` and its
`v2` sibling are flaky:
`qt_two_phase_off` / `qt_two_phase_on` intermittently fail with
```
Check tag 'two_phase_off' failed, line 6, TINYTEXT result mismatch.
Expect cell is: 123111
But real is : 123111.0
```
or the opposite direction (`expect 123111.0, real 123111`).
The suite inserts the string literal `"123111.0"` into `change_column`
while the column is being
altered from `double` to `text`, and then compares the whole row:
* rows written while the column is still `double` are stored as
`123111.0` and are converted by
the `double -> text` cast, which prints `123111`;
* rows written after the column has become `text` keep the literal
`123111.0`.
How many rows fall into each window depends on the schema change timing
(the test inserts one row
per loop iteration while `SHOW ALTER TABLE COLUMN` reports `RUNNING`),
so no single expected file
can match reliably.
This is a test issue rather than a product issue: both values are
correct for the phase in which
the row was written.
### What is changed?
Use an integer valued literal (`"123111"`) so the `double -> text`
conversion and the direct
`text` write both produce `123111`, and update the
`variant_p0/schema_change` expected file
accordingly. The `v2` expected file already contains `123111` only.
`branch-4.1` and `branch-4.2` carry the same case and would need the
same pick.
### Release note
None
### Check List (For Author)
- Test
- [x] Regression test
- Behavior changed:
- [x] No.
- Does this need documentation?
- [x] No.
---
.../schema_change/test_double_write_when_schema_change.out | 4 ++--
.../schema_change/test_double_write_when_schema_change.groovy | 6 +++++-
.../v2/schema_change/test_double_write_when_schema_change.groovy | 6 +++++-
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git
a/regression-test/data/variant_p0/schema_change/test_double_write_when_schema_change.out
b/regression-test/data/variant_p0/schema_change/test_double_write_when_schema_change.out
index 37aba8eb64c..1190a5f30bd 100644
---
a/regression-test/data/variant_p0/schema_change/test_double_write_when_schema_change.out
+++
b/regression-test/data/variant_p0/schema_change/test_double_write_when_schema_change.out
@@ -28,7 +28,7 @@ PullRequestEvent 2489395770 2015-01-01T01:00:02Z
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/1310570?","gravatar_id":"","id":1310570,"login":"soumith","url":"https://api.github.com/users/soumith"},"created_at":"2015-01-01T01:00:00Z","id":"2489395767","payload":{"before":"2d06657267b32e0c8e193c617039da200f710195","commits":[{"sha":"dbd68d30ee1f7b60d404553fc1c6226ebb374c8e","author":{"email":"[email protected]","name":"Soumith
Chintala"},"message":"back to old structure, except lua f [...]
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/6799218?","gravatar_id":"","id":6799218,"login":"gyuho","url":"https://api.github.com/users/gyuho"},"created_at":"2015-01-01T02:00:00Z","id":"2489418154","payload":{"before":"79d9868b8a1afbc5c6c42d33fcc7b97524f888ff","commits":[{"sha":"cf79996e894954b28db73a6bed54ba490c63f174","author":{"email":"[email protected]","name":"Gyu-Ho
Lee"},"message":"Commit with markdownx at 2014-12-31 17:59:58" [...]
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/4188511?","gravatar_id":"","id":4188511,"login":"iganari","url":"https://api.github.com/users/iganari"},"created_at":"2015-01-01T03:00:01Z","id":"2489436569","payload":{"action":"opened","number":44,"pull_request":{"_links":{"comments":{"href":"https://api.github.com/repos/iganari/mrtg/issues/44/comments"},"commits":{"href":"https://api.github.com/repos/iganari/mrtg/pulls/44/commits"},"html":{"href":"https://github.com/iga
[...]
-1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/100067519?","display_login":"savorfamily","gravatar_id":"123","id":100067519,"login":"savorfamily","url":"https://api.github.com/users/savorfamily"},"created_at":"2022-11-07T02:00:00Z","id":"25061216922","payload":{"before":"2bf823a4febcf809da126828ecef7617c8cc48ea","commits":[{"sha":"81106d369f763cb729d9d77610ace252c9db53f0","author":{"email":"[email protected]","name":"Upptime
Bot"},"message": [...]
+1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/100067519?","display_login":"savorfamily","gravatar_id":"123","id":100067519,"login":"savorfamily","url":"https://api.github.com/users/savorfamily"},"created_at":"2022-11-07T02:00:00Z","id":"25061216922","payload":{"before":"2bf823a4febcf809da126828ecef7617c8cc48ea","commits":[{"sha":"81106d369f763cb729d9d77610ace252c9db53f0","author":{"email":"[email protected]","name":"Upptime
Bot"},"message": [...]
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/100067519?","display_login":"savorfamily","gravatar_id":"123","id":100067519,"login":"savorfamily","url":"https://api.github.com/users/savorfamily"},"created_at":"2022-11-07T02:00:00Z","id":"25061216922","payload":{"before":"2bf823a4febcf809da126828ecef7617c8cc48ea","commits":[{"sha":"81106d369f763cb729d9d77610ace252c9db53f0","author":{"email":"[email protected]","name":"Upptime
Bot"},"message": [...]
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/100067519?","display_login":"savorfamily","gravatar_id":"123","id":100067519,"login":"savorfamily","url":"https://api.github.com/users/savorfamily"},"created_at":"2022-11-07T02:00:00Z","id":"25061216922","payload":{"before":"2bf823a4febcf809da126828ecef7617c8cc48ea","commits":[{"sha":"81106d369f763cb729d9d77610ace252c9db53f0","author":{"email":"[email protected]","name":"Upptime
Bot"},"message": [...]
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/100067519?","display_login":"savorfamily","gravatar_id":"123","id":100067519,"login":"savorfamily","url":"https://api.github.com/users/savorfamily"},"created_at":"2022-11-07T02:00:00Z","id":"25061216922","payload":{"before":"2bf823a4febcf809da126828ecef7617c8cc48ea","commits":[{"sha":"81106d369f763cb729d9d77610ace252c9db53f0","author":{"email":"[email protected]","name":"Upptime
Bot"},"message": [...]
@@ -40,7 +40,7 @@ PullRequestEvent 2489395770 2015-01-01T01:00:02Z
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/1310570?","gravatar_id":"","id":1310570,"login":"soumith","url":"https://api.github.com/users/soumith"},"created_at":"2015-01-01T01:00:00Z","id":"2489395767","payload":{"before":"2d06657267b32e0c8e193c617039da200f710195","commits":[{"sha":"dbd68d30ee1f7b60d404553fc1c6226ebb374c8e","author":{"email":"[email protected]","name":"Soumith
Chintala"},"message":"back to old structure, except lua f [...]
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/6799218?","gravatar_id":"","id":6799218,"login":"gyuho","url":"https://api.github.com/users/gyuho"},"created_at":"2015-01-01T02:00:00Z","id":"2489418154","payload":{"before":"79d9868b8a1afbc5c6c42d33fcc7b97524f888ff","commits":[{"sha":"cf79996e894954b28db73a6bed54ba490c63f174","author":{"email":"[email protected]","name":"Gyu-Ho
Lee"},"message":"Commit with markdownx at 2014-12-31 17:59:58" [...]
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/4188511?","gravatar_id":"","id":4188511,"login":"iganari","url":"https://api.github.com/users/iganari"},"created_at":"2015-01-01T03:00:01Z","id":"2489436569","payload":{"action":"opened","number":44,"pull_request":{"_links":{"comments":{"href":"https://api.github.com/repos/iganari/mrtg/issues/44/comments"},"commits":{"href":"https://api.github.com/repos/iganari/mrtg/pulls/44/commits"},"html":{"href":"https://github.com/iga
[...]
-1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/100067519?","display_login":"savorfamily","gravatar_id":"123","id":100067519,"login":"savorfamily","url":"https://api.github.com/users/savorfamily"},"created_at":"2022-11-07T02:00:00Z","id":"25061216922","payload":{"before":"2bf823a4febcf809da126828ecef7617c8cc48ea","commits":[{"sha":"81106d369f763cb729d9d77610ace252c9db53f0","author":{"email":"[email protected]","name":"Upptime
Bot"},"message": [...]
+1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/100067519?","display_login":"savorfamily","gravatar_id":"123","id":100067519,"login":"savorfamily","url":"https://api.github.com/users/savorfamily"},"created_at":"2022-11-07T02:00:00Z","id":"25061216922","payload":{"before":"2bf823a4febcf809da126828ecef7617c8cc48ea","commits":[{"sha":"81106d369f763cb729d9d77610ace252c9db53f0","author":{"email":"[email protected]","name":"Upptime
Bot"},"message": [...]
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/100067519?","display_login":"savorfamily","gravatar_id":"123","id":100067519,"login":"savorfamily","url":"https://api.github.com/users/savorfamily"},"created_at":"2022-11-07T02:00:00Z","id":"25061216922","payload":{"before":"2bf823a4febcf809da126828ecef7617c8cc48ea","commits":[{"sha":"81106d369f763cb729d9d77610ace252c9db53f0","author":{"email":"[email protected]","name":"Upptime
Bot"},"message": [...]
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/100067519?","display_login":"savorfamily","gravatar_id":"123","id":100067519,"login":"savorfamily","url":"https://api.github.com/users/savorfamily"},"created_at":"2022-11-07T02:00:00Z","id":"25061216922","payload":{"before":"2bf823a4febcf809da126828ecef7617c8cc48ea","commits":[{"sha":"81106d369f763cb729d9d77610ace252c9db53f0","author":{"email":"[email protected]","name":"Upptime
Bot"},"message": [...]
1
{"actor":{"avatar_url":"https://avatars.githubusercontent.com/u/100067519?","display_login":"savorfamily","gravatar_id":"123","id":100067519,"login":"savorfamily","url":"https://api.github.com/users/savorfamily"},"created_at":"2022-11-07T02:00:00Z","id":"25061216922","payload":{"before":"2bf823a4febcf809da126828ecef7617c8cc48ea","commits":[{"sha":"81106d369f763cb729d9d77610ace252c9db53f0","author":{"email":"[email protected]","name":"Upptime
Bot"},"message": [...]
diff --git
a/regression-test/suites/variant_p0/schema_change/test_double_write_when_schema_change.groovy
b/regression-test/suites/variant_p0/schema_change/test_double_write_when_schema_change.groovy
index a374408ebeb..be0f8bce00a 100644
---
a/regression-test/suites/variant_p0/schema_change/test_double_write_when_schema_change.groovy
+++
b/regression-test/suites/variant_p0/schema_change/test_double_write_when_schema_change.groovy
@@ -83,7 +83,11 @@ suite("double_write_schema_change_with_variant",
"nonConcurrent") {
return jobStateResult[0][9]
}
- def insert_sql = """ insert into ${table_name} values(1,
${variantV2Function}('{"id":"25061216922","type":"PushEvent","actor":{"id":100067519,"login":"savorfamily","display_login":"savorfamily","gravatar_id":"123","url":"https://api.github.com/users/savorfamily","avatar_url":"https://avatars.githubusercontent.com/u/100067519?"},"repo":{"id":461434218,"name":"savorfamily/upptime","url":"https://api.github.com/repos/savorfamily/upptime"},"payload":{"push_id":11572320522,"size":1,"disti
[...]
+ // Use an integer valued literal: the double -> text conversion prints
123111 as
+ // "123111", while a "123111.0" literal that is written after the column
has
+ // become text would stay "123111.0". Mixing both would make the whole row
+ // checks below depend on the schema change timing.
+ def insert_sql = """ insert into ${table_name} values(1,
${variantV2Function}('{"id":"25061216922","type":"PushEvent","actor":{"id":100067519,"login":"savorfamily","display_login":"savorfamily","gravatar_id":"123","url":"https://api.github.com/users/savorfamily","avatar_url":"https://avatars.githubusercontent.com/u/100067519?"},"repo":{"id":461434218,"name":"savorfamily/upptime","url":"https://api.github.com/repos/savorfamily/upptime"},"payload":{"push_id":11572320522,"size":1,"disti
[...]
def double_write = { ->
int max_try_time = 3000
diff --git
a/regression-test/suites/variant_p0/v2/schema_change/test_double_write_when_schema_change.groovy
b/regression-test/suites/variant_p0/v2/schema_change/test_double_write_when_schema_change.groovy
index 87fa283aaf6..a948e542f47 100644
---
a/regression-test/suites/variant_p0/v2/schema_change/test_double_write_when_schema_change.groovy
+++
b/regression-test/suites/variant_p0/v2/schema_change/test_double_write_when_schema_change.groovy
@@ -83,7 +83,11 @@ suite("double_write_schema_change_with_variant",
"nonConcurrent") {
return jobStateResult[0][9]
}
- def insert_sql = """ insert into ${table_name} values(1,
${variantV2Function}('{"id":"25061216922","type":"PushEvent","actor":{"id":100067519,"login":"savorfamily","display_login":"savorfamily","gravatar_id":"123","url":"https://api.github.com/users/savorfamily","avatar_url":"https://avatars.githubusercontent.com/u/100067519?"},"repo":{"id":461434218,"name":"savorfamily/upptime","url":"https://api.github.com/repos/savorfamily/upptime"},"payload":{"push_id":11572320522,"size":1,"disti
[...]
+ // Use an integer valued literal: the double -> text conversion prints
123111 as
+ // "123111", while a "123111.0" literal that is written after the column
has
+ // become text would stay "123111.0". Mixing both would make the whole row
+ // checks below depend on the schema change timing.
+ def insert_sql = """ insert into ${table_name} values(1,
${variantV2Function}('{"id":"25061216922","type":"PushEvent","actor":{"id":100067519,"login":"savorfamily","display_login":"savorfamily","gravatar_id":"123","url":"https://api.github.com/users/savorfamily","avatar_url":"https://avatars.githubusercontent.com/u/100067519?"},"repo":{"id":461434218,"name":"savorfamily/upptime","url":"https://api.github.com/repos/savorfamily/upptime"},"payload":{"push_id":11572320522,"size":1,"disti
[...]
def double_write = { ->
int max_try_time = 3000
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]