You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "luoyuxia (via GitHub)" <gi...@apache.org> on 2026/06/22 03:30:40 UTC
[PR] [flink] Refactor tiering split assertions to ignore round metadata [fluss]
luoyuxia opened a new pull request, #3506:
URL: https://github.com/apache/fluss/pull/3506
## Summary
- `#3503` added `splitIndex` and `tieringRoundTimestamp` to `TieringSplit`'s `equals`/`hashCode`, which broke `TieringSourceEnumeratorTest`: the expected splits built in tests carry `UNKNOWN` round metadata while the actual assigned splits carry generation-time values, so `containsExactlyInAnyOrderElementsOf` no longer matches.
- Refactor the test helpers: validate the per-round metadata (split indexes cover `0..n-1`, a single first split, a shared positive timestamp) separately via `assertValidTieringRound`, then normalize the volatile fields away before comparing the remaining fields with the regular `equals`.
- This replaces the previous `assertTieringRoundMetadata`/`clearTieringSplitMetadata` helpers that mutated the actual splits in place, and applies the round-metadata validation consistently across all assignment assertions.
- Also drop the now-unused `splitIndex`/`tieringRoundTimestamp` validation from `TieringSplit` and trim the redundant identity/default cases in `TieringSplitSerializerTest`.
## Test Plan
- `./mvnw test -pl fluss-flink/fluss-flink-common -Dtest=TieringSourceEnumeratorTest,TieringSplitSerializerTest` — all pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [flink] Refactor tiering split assertions to ignore round metadata [fluss]
Posted by "fresh-borzoni (via GitHub)" <gi...@apache.org>.
fresh-borzoni merged PR #3506:
URL: https://github.com/apache/fluss/pull/3506
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [flink] Refactor tiering split assertions to ignore round metadata [fluss]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org