[bug](group commit) Fix group commit blocked after schema change throw exception#54113
Merged
lide-reed merged 1 commit intoapache:masterfrom Aug 4, 2025
Merged
[bug](group commit) Fix group commit blocked after schema change throw exception#54113lide-reed merged 1 commit intoapache:masterfrom
lide-reed merged 1 commit intoapache:masterfrom
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Member
Author
|
run buildall |
TPC-H: Total hot run time: 33866 ms |
TPC-DS: Total hot run time: 171801 ms |
ClickBench: Total hot run time: 33.21 s |
cambyzju
approved these changes
Jul 31, 2025
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
xy720
added a commit
to xy720/doris
that referenced
this pull request
Aug 5, 2025
…w exception (apache#54113) Fix group commit blocked after schema change throw exception Problem Summary: Reproduce step: 1、create table ``` CREATE TABLE `test_table_uniq` ( `company_id` varchar(32) NOT NULL, `date` datetime NOT NULL, `discount` decimal(19,10) NULL, ) ENGINE=OLAP UNIQUE KEY(`company_id`, `date`) DISTRIBUTED BY HASH(`company_id`) BUCKETS 8 ``` 2、group commit insert SUCCESS ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(1, '2025-07-25', 10); ``` 3、create rollup and wait job SUCCESS ``` CREATE MATERIALIZED VIEW mv_company_day AS SELECT company_id, date FROM test_table_uniq; ``` 4、group commit insert SUCCESS ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(2, '2025-07-25', 11); ``` 5、create rollup with same name and throw exception ``` CREATE MATERIALIZED VIEW mv_company_day AS SELECT company_id, date FROM test_table_uniq; ERROR 1105 (HY000): errCode = 2, detailMessage = Materialized view[mv_company_day] already exists ``` 6、group commit insert FAIL ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(3, '2025-07-25', 12); ``` JDBC ERROR LOG: ``` java.sql.BatchUpdateException: errCode = 2, detailMessage = insert table 1753872336812 is blocked on schema change at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.util.Util.handleNewInstance(Util.java:192) at com.mysql.cj.util.Util.getInstance(Util.java:167) at com.mysql.cj.util.Util.getInstance(Util.java:174) at com.mysql.cj.jdbc.exceptions.SQLError.createBatchUpdateException(SQLError.java:224) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:755) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchInternal(ClientPreparedStatement.java:426) at com.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:795) at DorisStressTest.main(DorisStressTest.java:78) Caused by: java.sql.SQLException: errCode = 2, detailMessage = insert table 1753872336812 is blocked on schema change at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:633) at com.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:417) at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1098) at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1046) at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1371) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:716) ``` master/3.0/2.1 - Test <!-- At least one of them must be included. --> - [x] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [x] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [x] No. - [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 --> - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
xy720
added a commit
to xy720/doris
that referenced
this pull request
Aug 5, 2025
…w exception (apache#54113) Fix group commit blocked after schema change throw exception Problem Summary: Reproduce step: 1、create table ``` CREATE TABLE `test_table_uniq` ( `company_id` varchar(32) NOT NULL, `date` datetime NOT NULL, `discount` decimal(19,10) NULL, ) ENGINE=OLAP UNIQUE KEY(`company_id`, `date`) DISTRIBUTED BY HASH(`company_id`) BUCKETS 8 ``` 2、group commit insert SUCCESS ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(1, '2025-07-25', 10); ``` 3、create rollup and wait job SUCCESS ``` CREATE MATERIALIZED VIEW mv_company_day AS SELECT company_id, date FROM test_table_uniq; ``` 4、group commit insert SUCCESS ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(2, '2025-07-25', 11); ``` 5、create rollup with same name and throw exception ``` CREATE MATERIALIZED VIEW mv_company_day AS SELECT company_id, date FROM test_table_uniq; ERROR 1105 (HY000): errCode = 2, detailMessage = Materialized view[mv_company_day] already exists ``` 6、group commit insert FAIL ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(3, '2025-07-25', 12); ``` JDBC ERROR LOG: ``` java.sql.BatchUpdateException: errCode = 2, detailMessage = insert table 1753872336812 is blocked on schema change at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.util.Util.handleNewInstance(Util.java:192) at com.mysql.cj.util.Util.getInstance(Util.java:167) at com.mysql.cj.util.Util.getInstance(Util.java:174) at com.mysql.cj.jdbc.exceptions.SQLError.createBatchUpdateException(SQLError.java:224) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:755) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchInternal(ClientPreparedStatement.java:426) at com.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:795) at DorisStressTest.main(DorisStressTest.java:78) Caused by: java.sql.SQLException: errCode = 2, detailMessage = insert table 1753872336812 is blocked on schema change at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:633) at com.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:417) at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1098) at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1046) at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1371) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:716) ``` master/3.0/2.1
Merged
16 tasks
dataroaring
pushed a commit
that referenced
this pull request
Aug 12, 2025
… change throw exception (#54312) Fix group commit blocked after schema change throw exception Problem Summary: pick #54113 Reproduce step: 1、create table ``` CREATE TABLE `test_table_uniq` ( `company_id` varchar(32) NOT NULL, `date` datetime NOT NULL, `discount` decimal(19,10) NULL, ) ENGINE=OLAP UNIQUE KEY(`company_id`, `date`) DISTRIBUTED BY HASH(`company_id`) BUCKETS 8 ``` 2、group commit insert SUCCESS ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(1, '2025-07-25', 10); ``` 3、create rollup and wait job SUCCESS ``` CREATE MATERIALIZED VIEW mv_company_day AS SELECT company_id, date FROM test_table_uniq; ``` 4、group commit insert SUCCESS ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(2, '2025-07-25', 11); ``` 5、create rollup with same name and throw exception ``` CREATE MATERIALIZED VIEW mv_company_day AS SELECT company_id, date FROM test_table_uniq; ERROR 1105 (HY000): errCode = 2, detailMessage = Materialized view[mv_company_day] already exists ``` 6、group commit insert FAIL ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(3, '2025-07-25', 12); ``` JDBC ERROR LOG: ``` java.sql.BatchUpdateException: errCode = 2, detailMessage = insert table 1753872336812 is blocked on schema change at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.util.Util.handleNewInstance(Util.java:192) at com.mysql.cj.util.Util.getInstance(Util.java:167) at com.mysql.cj.util.Util.getInstance(Util.java:174) at com.mysql.cj.jdbc.exceptions.SQLError.createBatchUpdateException(SQLError.java:224) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:755) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchInternal(ClientPreparedStatement.java:426) at com.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:795) at DorisStressTest.main(DorisStressTest.java:78) Caused by: java.sql.SQLException: errCode = 2, detailMessage = insert table 1753872336812 is blocked on schema change at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:633) at com.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:417) at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1098) at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1046) at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1371) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:716) ``` master/3.0/2.1 ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [ ] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [ ] No. - [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
16 tasks
BiteTheDDDDt
pushed a commit
that referenced
this pull request
Aug 22, 2025
xy720
added a commit
to xy720/doris
that referenced
this pull request
Sep 4, 2025
…w exception (apache#54113) Fix group commit blocked after schema change throw exception Problem Summary: Reproduce step: 1、create table ``` CREATE TABLE `test_table_uniq` ( `company_id` varchar(32) NOT NULL, `date` datetime NOT NULL, `discount` decimal(19,10) NULL, ) ENGINE=OLAP UNIQUE KEY(`company_id`, `date`) DISTRIBUTED BY HASH(`company_id`) BUCKETS 8 ``` 2、group commit insert SUCCESS ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(1, '2025-07-25', 10); ``` 3、create rollup and wait job SUCCESS ``` CREATE MATERIALIZED VIEW mv_company_day AS SELECT company_id, date FROM test_table_uniq; ``` 4、group commit insert SUCCESS ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(2, '2025-07-25', 11); ``` 5、create rollup with same name and throw exception ``` CREATE MATERIALIZED VIEW mv_company_day AS SELECT company_id, date FROM test_table_uniq; ERROR 1105 (HY000): errCode = 2, detailMessage = Materialized view[mv_company_day] already exists ``` 6、group commit insert FAIL ``` SET group_commit = async_mode; INSERT INTO test_table_uniq (company_id, date, discount) VALUES(3, '2025-07-25', 12); ``` JDBC ERROR LOG: ``` java.sql.BatchUpdateException: errCode = 2, detailMessage = insert table 1753872336812 is blocked on schema change at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.util.Util.handleNewInstance(Util.java:192) at com.mysql.cj.util.Util.getInstance(Util.java:167) at com.mysql.cj.util.Util.getInstance(Util.java:174) at com.mysql.cj.jdbc.exceptions.SQLError.createBatchUpdateException(SQLError.java:224) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:755) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchInternal(ClientPreparedStatement.java:426) at com.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:795) at DorisStressTest.main(DorisStressTest.java:78) Caused by: java.sql.SQLException: errCode = 2, detailMessage = insert table 1753872336812 is blocked on schema change at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:633) at com.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:417) at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1098) at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1046) at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1371) at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:716) ``` master/3.0/2.1 - Test <!-- At least one of them must be included. --> - [x] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [x] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [x] No. - [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 --> - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
Merged
16 tasks
yiguolei
pushed a commit
that referenced
this pull request
Sep 5, 2025
… change throw exception (#55684) ### What problem does this PR solve? pick #54113 #55132 ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [x] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [x] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [x] No. - [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Fix group commit blocked after schema change throw exception
Problem Summary:
Reproduce step:
1、create table
2、group commit insert SUCCESS
3、create rollup and wait job SUCCESS
4、group commit insert SUCCESS
5、create rollup with same name and throw exception
6、group commit insert FAIL
JDBC ERROR LOG:
Release note
master/3.0/2.1
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)