You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "sandynz (via GitHub)" <gi...@apache.org> on 2026/04/16 09:32:33 UTC
[PR] Pipeline: Fix MySQL fractional temporal binlog decoding in migration [shardingsphere]
sandynz opened a new pull request, #38630:
URL: https://github.com/apache/shardingsphere/pull/38630
Related to #38629.
Changes proposed in this pull request:
- protocol-mysql: consume zero-value fractional bytes for TIME2 and TIMESTAMP2
- cover MySQL timestamp(4) and time(4) migration E2E
---
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Pipeline: Fix MySQL fractional temporal binlog decoding in migration [shardingsphere]
Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz merged PR #38630:
URL: https://github.com/apache/shardingsphere/pull/38630
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Pipeline: Fix MySQL fractional temporal binlog decoding in migration [shardingsphere]
Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on PR #38630:
URL: https://github.com/apache/shardingsphere/pull/38630#issuecomment-4259731049
## Scope
This PR further improves binlog decoding and verification coverage for MySQL fractional temporal types during migration incremental stage.
The root cause is that `DATETIME2`, `TIMESTAMP2`, and `TIME2` could return early on the zero-value branch and skip consuming fractional bytes, which misaligned decoding for following columns and subsequent events.
## Main Changes
- Fixed `MySQLTimestamp2BinlogProtocolValue` and `MySQLTime2BinlogProtocolValue` so the zero-value branch still consumes fractional bytes according to `columnMeta`.
- Added regression unit tests for zero-value `TIMESTAMP2` and `TIME2` with fractional precision, completing the coverage together with the existing `DATETIME2` fix.
- Extended `MySQLTimeTypesMigrationE2EIT` so the same migration E2E covers incremental migration of `timestamp(4)`, `datetime(4)`, and `time(4)`.
- Refined the E2E expression by removing DDL `DEFAULT`-based implicit test values and writing the expected values explicitly in test methods, making the scenario easier to read and maintain.
## E2E Validation Improvement
The E2E path was improved in two ways so the test becomes more stable and easier to maintain:
- It explicitly waits for `EXECUTE_INCREMENTAL_TASK` before inserting incremental data, ensuring the tested row enters the incremental pipeline.
- It consolidates `timestamp(4)`, `datetime(4)`, and `time(4)` coverage into the same `time_e2e` table, reducing duplicated E2E maintenance and execution cost.
At the same time, both inventory and incremental rows now write the target values explicitly instead of relying on schema defaults, which makes the test intent clearer and future debugging easier.
## Verification
- `./mvnw -pl database/protocol/dialect/mysql -Dtest=MySQLDatetime2BinlogProtocolValueTest,MySQLTimestamp2BinlogProtocolValueTest,MySQLTime2BinlogProtocolValueTest,MySQLFractionalSecondsTest test -Dsurefire.failIfNoSpecifiedTests=false -DskipITs -Dspotless.skip=true -Dcheckstyle.skip=true`
- Exit code: 0
- `./mvnw -pl database/protocol/dialect/mysql -DskipTests -Pcheck -Dspotless.skip=true checkstyle:check`
- Exit code: 0
- `./mvnw -pl test/e2e/operation/pipeline -DskipTests -DskipITs -Dspotless.skip=true -Dcheckstyle.skip=true test-compile`
- Exit code: 0
- `./mvnw -pl test/e2e/operation/pipeline -DskipTests -Pcheck -Dspotless.skip=true checkstyle:check`
- Exit code: 0
## Notes
- The scope of this PR stays focused on MySQL fractional temporal binlog decoding and the related migration E2E coverage, without introducing extra configuration changes.
- The E2E scenario has been changed from relying on schema defaults to writing test values explicitly in test steps, which improves maintainability and issue analysis.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org