Copilot commented on code in PR #3506:
URL: https://github.com/apache/fluss/pull/3506#discussion_r3449656485


##########
fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/tiering/source/split/TieringSplit.java:
##########
@@ -87,8 +87,6 @@ public TieringSplit(
         }
         this.numberOfSplits = numberOfSplits;
         this.skipCurrentRound = skipCurrentRound;
-        validateSplitIndex(numberOfSplits, splitIndex);
-        validateTieringRoundTimestamp(tieringRoundTimestamp);
         this.splitIndex = splitIndex;
         this.tieringRoundTimestamp = tieringRoundTimestamp;

Review Comment:
   `TieringSplit` no longer validates `splitIndex` / `tieringRoundTimestamp` 
invariants. These fields are used for writer coordination (e.g., 
`TieringSplitReader#getOrCreateLakeWriter`), so allowing values like splitIndex 
< -1, splitIndex >= numberOfSplits (when known), or non-positive timestamps can 
hide bugs and cause incorrect coordination at runtime. Consider restoring 
constructor-time validation (keeping `-1` as the unknown sentinel).



##########
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/source/split/TieringSplitSerializerTest.java:
##########
@@ -153,7 +153,7 @@ void testSkipCurrentRoundSerde() throws Exception {
     }
 
     @Test
-    void testTieringRoundMetadataSerde() throws Exception {
+    void testTieringRoundTimestampSerde() throws Exception {
         TieringSnapshotSplit snapshotSplit =
                 new TieringSnapshotSplit(tablePath, tableBucket, null, 0L, 
200L, 10, 0, 1000L);
         byte[] serialized = serializer.serialize(snapshotSplit);

Review Comment:
   `TieringSplitSerializerTest` no longer has a regression test asserting that 
`splitIndex` / `tieringRoundTimestamp` participate in `equals`/`hashCode` (the 
`isNotEqualTo` cases were removed). Since the rest of this PR intentionally 
normalizes these fields away in enumerator assertions, losing this coverage 
makes it easy to accidentally remove them from identity semantics without any 
test failing.



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