luoyuxia commented on code in PR #1925:
URL: https://github.com/apache/fluss/pull/1925#discussion_r2493520590


##########
fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/tiering/source/split/TieringSplitGenerator.java:
##########
@@ -291,6 +303,13 @@ private Optional<TieringSplit> 
generateSplitForLogTableBucket(
             @Nullable String partitionName,
             @Nullable Long lastCommittedBucketOffset,
             long latestBucketOffset) {
+        if (latestBucketOffset <= 0) {
+            LOG.info(
+                    "The latestBucketOffset {} is equals or less than 0, skip 
generating split for bucket {}",

Review Comment:
   dito



##########
fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/tiering/source/split/TieringSplitGenerator.java:
##########
@@ -243,6 +243,13 @@ private Optional<TieringSplit> 
generateSplitForPrimaryKeyTableBucket(
             @Nullable Long latestOffsetOfSnapshot,
             @Nullable Long lastCommittedBucketOffset,
             long latestBucketOffset) {
+        if (latestBucketOffset <= 0) {
+            LOG.info(

Review Comment:
   use debug or remove from logging.
   



##########
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/source/enumerator/TieringSourceEnumeratorTest.java:
##########
@@ -89,23 +89,16 @@ void testPrimaryKeyTableWithNoSnapshotSplits() throws 
Throwable {
                 registerReader(context, enumerator, subtaskId, "localhost-" + 
subtaskId);
                 enumerator.handleSplitRequest(subtaskId, "localhost-" + 
subtaskId);
             }
-            waitUntilTieringTableSplitAssignmentReady(context, 
DEFAULT_BUCKET_NUM, 200L);
-            List<TieringSplit> expectedAssignment = new ArrayList<>();
-            for (int bucketId = 0; bucketId < DEFAULT_BUCKET_NUM; bucketId++) {
-                expectedAssignment.add(
-                        new TieringLogSplit(
-                                tablePath,
-                                new TableBucket(tableId, bucketId),
-                                null,
-                                EARLIEST_OFFSET,
-                                0,
-                                expectNumberOfSplits));
-            }
+
+            // try to assign splits
+            context.runPeriodicCallable(0);
+
             List<TieringSplit> actualAssignment = new ArrayList<>();
             context.getSplitsAssignmentSequence()
                     .forEach(a -> 
a.assignment().values().forEach(actualAssignment::addAll));
 
-            assertThat(actualAssignment).isEqualTo(expectedAssignment);
+            // no spilt assignment for empty buckets

Review Comment:
   +1



-- 
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]

Reply via email to