Skip to content

Fix SHOW MIGRATION RULE always display default values when ALTER MIGRATION RULE without STREAM_CHANNEL#37737

Merged
sandynz merged 2 commits intoapache:masterfrom
sandynz:pipeline-1
Jan 14, 2026
Merged

Fix SHOW MIGRATION RULE always display default values when ALTER MIGRATION RULE without STREAM_CHANNEL#37737
sandynz merged 2 commits intoapache:masterfrom
sandynz:pipeline-1

Conversation

@sandynz
Copy link
Contributor

@sandynz sandynz commented Jan 14, 2026

Related to #32727

Changes proposed in this pull request:

  • Fix SHOW MIGRATION RULE always display default values when ALTER MIGRATION RULE without STREAM_CHANNEL

Issue:

mysql> SHOW MIGRATION RULE;
+--------------------------------------------------------------+--------------------------------------+-------------------------------------------------------+
| read                                                         | write                                | stream_channel                                        |
+--------------------------------------------------------------+--------------------------------------+-------------------------------------------------------+
| {"workerThread":20,"batchSize":1000,"shardingSize":10000000} | {"workerThread":20,"batchSize":1000} | {"type":"MEMORY","props":{"block-queue-size":"2000"}} |
+--------------------------------------------------------------+--------------------------------------+-------------------------------------------------------+
1 row in set (0.81 sec)

mysql> ALTER MIGRATION RULE (
    -> READ(
    ->   WORKER_THREAD=10,
    ->   BATCH_SIZE=2000,
    ->   SHARDING_SIZE=5000000,
    ->   RATE_LIMITER (TYPE(NAME='QPS',PROPERTIES('qps'='500')))
    -> )
    -> );
Query OK, 0 rows affected (0.10 sec)

-- It still show default values
mysql> SHOW MIGRATION RULE;
+--------------------------------------------------------------+--------------------------------------+-------------------------------------------------------+
| read                                                         | write                                | stream_channel                                        |
+--------------------------------------------------------------+--------------------------------------+-------------------------------------------------------+
| {"workerThread":20,"batchSize":1000,"shardingSize":10000000} | {"workerThread":20,"batchSize":1000} | {"type":"MEMORY","props":{"block-queue-size":"2000"}} |
+--------------------------------------------------------------+--------------------------------------+-------------------------------------------------------+
1 row in set (0.01 sec)

After fixing:

mysql> SHOW MIGRATION RULE;
+----------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------------------------------------------------+
| read                                                                                                           | write                                | stream_channel                                        |
+----------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------------------------------------------------+
| {"workerThread":10,"batchSize":2000,"shardingSize":5000000,"rateLimiter":{"type":"QPS","props":{"qps":"500"}}} | {"workerThread":20,"batchSize":1000} | {"type":"MEMORY","props":{"block-queue-size":"2000"}} |
+----------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------------------------------------------------+
1 row in set (0.68 sec)

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

@sandynz sandynz merged commit 2019c97 into apache:master Jan 14, 2026
24 checks passed
@sandynz sandynz deleted the pipeline-1 branch January 14, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants