You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "loserwang1024 (via GitHub)" <gi...@apache.org> on 2024/08/08 08:14:46 UTC
[PR] [FLINK-34688][cdc-connector] Fix: The assigner is not ready to offer finished split information, this should not be called [flink-cdc]
loserwang1024 opened a new pull request, #3519:
URL: https://github.com/apache/flink-cdc/pull/3519
As described in https://issues.apache.org/jira/browse/FLINK-35859 , only discover new added table when `assignerStatus == INITIAL_ASSIGNING_FINISHED or || assignerStatus == NEWLY_ADDED_ASSIGNING_FINISHED`. It also same with what java doc says:
<img width="1199" alt="image" src="https://github.com/user-attachments/assets/4a2c5741-c145-4d14-b711-fd42bdff8e13">
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-34688][cdc-connector] Fix: The assigner is not ready to offer finished split information, this should not be called [flink-cdc]
Posted by "leonardBang (via GitHub)" <gi...@apache.org>.
leonardBang commented on code in PR #3519:
URL: https://github.com/apache/flink-cdc/pull/3519#discussion_r1709493160
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssignerTest.java:
##########
@@ -484,15 +484,33 @@ public void testEnumerateTablesLazily() {
}
@Test
- public void testScanNewlyAddedTableStartFromCheckpoint() {
+ public void testScanNewlyAddedTableStartFromCheckpoint_INITIAL_ASSIGNING_FINISHED() {
List<String> expected =
Arrays.asList(
"customers_sparse_dist [109] null",
"customers_even_dist null [10]",
"customers_even_dist [10] [18]",
"customers_even_dist [18] null",
"customer_card_single_line null null");
- assertEquals(expected, getTestAssignSnapshotSplitsFromCheckpoint());
+ assertEquals(
+ expected,
+ getTestAssignSnapshotSplitsFromCheckpoint(
+ AssignerStatus.INITIAL_ASSIGNING_FINISHED));
+ }
+
+ @Test
+ public void
+ testScanNewlyAddedTableStartFromCheckpoint_NEWLY_ADDED_ASSIGNING_SNAPSHOT_FINISHED() {
Review Comment:
minor: The method name should use camel case
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssignerTest.java:
##########
@@ -536,7 +554,7 @@ private List<String> getTestAssignSnapshotSplits(
return getSplitsFromAssigner(assigner);
}
- private List<String> getTestAssignSnapshotSplitsFromCheckpoint() {
+ private List<String> getTestAssignSnapshotSplitsFromCheckpoint(AssignerStatus assignerStatus) {
Review Comment:
minor: The method name should use camel case
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-34688][cdc-connector] Fix: The assigner is not ready to offer finished split information, this should not be called [flink-cdc]
Posted by "leonardBang (via GitHub)" <gi...@apache.org>.
leonardBang commented on PR #3519:
URL: https://github.com/apache/flink-cdc/pull/3519#issuecomment-2275242318
Thanks for fix this ticket, @loserwang1024 Would you like to add a test?
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-34688][cdc-connector] Fix: The assigner is not ready to offer finished split information, this should not be called [flink-cdc]
Posted by "loserwang1024 (via GitHub)" <gi...@apache.org>.
loserwang1024 commented on code in PR #3519:
URL: https://github.com/apache/flink-cdc/pull/3519#discussion_r1710552773
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssignerTest.java:
##########
@@ -536,7 +554,7 @@ private List<String> getTestAssignSnapshotSplits(
return getSplitsFromAssigner(assigner);
}
- private List<String> getTestAssignSnapshotSplitsFromCheckpoint() {
+ private List<String> getTestAssignSnapshotSplitsFromCheckpoint(AssignerStatus assignerStatus) {
Review Comment:
done
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssignerTest.java:
##########
@@ -484,15 +484,33 @@ public void testEnumerateTablesLazily() {
}
@Test
- public void testScanNewlyAddedTableStartFromCheckpoint() {
+ public void testScanNewlyAddedTableStartFromCheckpoint_INITIAL_ASSIGNING_FINISHED() {
List<String> expected =
Arrays.asList(
"customers_sparse_dist [109] null",
"customers_even_dist null [10]",
"customers_even_dist [10] [18]",
"customers_even_dist [18] null",
"customer_card_single_line null null");
- assertEquals(expected, getTestAssignSnapshotSplitsFromCheckpoint());
+ assertEquals(
+ expected,
+ getTestAssignSnapshotSplitsFromCheckpoint(
+ AssignerStatus.INITIAL_ASSIGNING_FINISHED));
+ }
+
+ @Test
+ public void
+ testScanNewlyAddedTableStartFromCheckpoint_NEWLY_ADDED_ASSIGNING_SNAPSHOT_FINISHED() {
Review Comment:
done
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-34688][cdc-connector] Fix: The assigner is not ready to offer finished split information, this should not be called [flink-cdc]
Posted by "leonardBang (via GitHub)" <gi...@apache.org>.
leonardBang merged PR #3519:
URL: https://github.com/apache/flink-cdc/pull/3519
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org