Copilot commented on code in PR #2316:
URL: https://github.com/apache/fluss/pull/2316#discussion_r2667195166
##########
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/committer/TieringCommitOperatorTest.java:
##########
@@ -461,6 +461,50 @@ private void verifyLakeSnapshot(
assertThat(failedTieringEvent.failReason()).contains(failedReason);
}
+ @Test
+ void testCommitFailsWhenTableRecreated() throws Exception {
+ TablePath tablePath = TablePath.of("fluss",
"test_commit_fails_when_table_recreated");
+ long originalTableId = createTable(tablePath,
DEFAULT_PK_TABLE_DESCRIPTOR);
+ int numberOfWriteResults = 3;
+
+ // Send write results for the first bucket
+ TableBucket tableBucket = new TableBucket(originalTableId, 0);
+ committerOperator.processElement(
+ createTableBucketWriteResultStreamRecord(
+ tablePath, tableBucket, 1, 1, 1L,
numberOfWriteResults));
Review Comment:
The test sends a write result for bucket 0 before dropping the table, but
this write result alone won't trigger a commit because it's waiting for all 3
buckets. Consider adding a comment to clarify that this initial write result is
intentionally buffered and not committed, which sets up the scenario for
testing the table ID check when the remaining buckets trigger the commit after
table recreation.
--
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]