You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "iampratap7997-dot (via GitHub)" <gi...@apache.org> on 2026/02/17 01:31:30 UTC

[PR] [Fix-17979][DAO] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command. [dolphinscheduler]

iampratap7997-dot opened a new pull request, #17983:
URL: https://github.com/apache/dolphinscheduler/pull/17983

   ## Purpose of the pull request
   
   This PR fixes a data type mismatch between the MySQL schema and Java entity mapping for `t_ds_serial_command`.
   
   The column `workflow_definition_code` was defined as `INT(11)` in the 3.4.0 MySQL schema, while the corresponding Java field uses `Long`. This may cause data truncation errors when values exceed the range of `INT`.
   
   ## Brief change log
   
   - Change `workflow_definition_code` from  `INT(11)` to `BIGINT(20)` in `3.4.0_schema/mysql`
   - Add upgrade SQL in `3.4.1_schema/mysql` to modify the existing column to `BIGINT(20)`
   - Align `workflowInstanceId` Java type from `Integer` to `Long` to match existing    DB definition (`BIGINT(20)`)
   
   ## Verify this pull request
   
   This change is covered by existing tests.
   
   Additionally:
   - Verified schema consistency manually
   - Confirmed no remaining `INT(11)` definition for `workflow_definition_code`
   - Ensured upgrade SQL is provided for existing deployments
   
   ## Pull Request Notice
   [Pull Request Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
   
   If your pull request contains incompatible change, you should also add it to `docs/docs/en/guide/upgrade/incompatible.md`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix-17979][DAO] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command. [dolphinscheduler]

Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun closed pull request #17983: [Fix-17979][DAO] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command.
URL: https://github.com/apache/dolphinscheduler/pull/17983


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix-17979][dao] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command. [dolphinscheduler]

Posted by "iampratap7997-dot (via GitHub)" <gi...@apache.org>.
iampratap7997-dot closed pull request #17983: [Fix-17979][dao] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command.
URL: https://github.com/apache/dolphinscheduler/pull/17983


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix-17979][dao] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command. [dolphinscheduler]

Posted by "iampratap7997-dot (via GitHub)" <gi...@apache.org>.
iampratap7997-dot commented on code in PR #17983:
URL: https://github.com/apache/dolphinscheduler/pull/17983#discussion_r2828336086


##########
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.4.0_schema/mysql/dolphinscheduler_ddl.sql:
##########
@@ -25,7 +25,7 @@ ALTER TABLE `t_ds_task_group_queue` ADD KEY `idx_workflow_instance_id` (`workflo
 -- ----------------------------
 CREATE TABLE IF NOT EXISTS `t_ds_serial_command` (
    `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
-   `workflow_definition_code` int(11) NOT NULL COMMENT 'workflow definition code',
+   `workflow_definition_code` bigint(20) NOT NULL COMMENT 'workflow definition code',

Review Comment:
   > Please don't change the 3.4.0 ddl, since this version has been released, we should alter the column at 3.4.1 ddl.
   
   Reverted changes in 3.4.0 schema and moved the column modification to 3.4.1 upgrade DDL as suggested. 
   Please review again.
   Thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix-17979][dao] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command. [dolphinscheduler]

Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on code in PR #17983:
URL: https://github.com/apache/dolphinscheduler/pull/17983#discussion_r2828207446


##########
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.4.0_schema/mysql/dolphinscheduler_ddl.sql:
##########
@@ -25,7 +25,7 @@ ALTER TABLE `t_ds_task_group_queue` ADD KEY `idx_workflow_instance_id` (`workflo
 -- ----------------------------
 CREATE TABLE IF NOT EXISTS `t_ds_serial_command` (
    `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
-   `workflow_definition_code` int(11) NOT NULL COMMENT 'workflow definition code',
+   `workflow_definition_code` bigint(20) NOT NULL COMMENT 'workflow definition code',

Review Comment:
   Please don't change the 3.4.0 ddl, since this version has been released, we should alter the column at 3.4.1 ddl.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix-17979][DAO] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command. [dolphinscheduler]

Posted by "iampratap7997-dot (via GitHub)" <gi...@apache.org>.
iampratap7997-dot commented on PR #17983:
URL: https://github.com/apache/dolphinscheduler/pull/17983#issuecomment-3921612079

   > Need to make change at
   > 
   > ```
   > dolphinscheduler_h2.sql
   > dolphinscheduler_mysql.sql
   > dolphinscheduler_postgresql.sql
   > ```
   > 
   > and add ddl at
   > 
   > ```
   > postgresql/dolphinscheduler_ddl.sql
   > ```
   
   Addressed the requested changes in H2, MySQL, and PostgreSQL schemas and added the required PostgreSQL upgrade DDL.
   Please review again.
   
    Thanks,
   Divyansh.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org