sandynz opened a new pull request, #37737:
URL: https://github.com/apache/shardingsphere/pull/37737
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](https://shardingsphere.apache.org/community/en/involved/conduct/code/)
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](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]