luoyuxia commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387006215
##########
fluss-lake/fluss-lake-iceberg/src/main/java/org/apache/fluss/lake/iceberg/tiering/IcebergLakeCommitter.java:
##########
@@ -314,8 +313,8 @@ private Snapshot getCommittedLatestSnapshotOfLake(String
commitUser) {
List<Snapshot> snapshots = (List<Snapshot>) icebergTable.snapshots();
// snapshots() returns snapshots in chronological order (oldest to
newest), Reverse to find
// most recent snapshot committed by Fluss
- Collections.reverse(snapshots);
- for (Snapshot snapshot : snapshots) {
+ for (int i = snapshots.size() - 1; i >= 0; i--) {
Review Comment:
Reverse snapshots directly will throw
```
Tiering table 1 is failed, fail reason is
java.lang.UnsupportedOperationException
at
org.apache.iceberg.relocated.com.google.common.collect.ImmutableList.set(ImmutableList.java:542)
at java.base/java.util.Collections.swap(Collections.java:501)
at java.base/java.util.Collections.reverse(Collections.java:382)
at
org.apache.fluss.lake.iceberg.tiering.IcebergLakeCommitter.getCommittedLatestSnapshotOfLake(IcebergLak
```
--
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]