wuchong commented on code in PR #2767:
URL: https://github.com/apache/fluss/pull/2767#discussion_r2877844818
##########
fluss-server/src/main/java/org/apache/fluss/server/log/remote/LogTieringTask.java:
##########
@@ -226,6 +229,12 @@ private List<EnrichedLogSegment>
candidateToCopyLogSegments(LogTablet log) {
highWatermark);
}
+ // Limit the number of segments to upload per task execution to prevent
+ // overwhelming the remote storage when there is a large backlog.
+ if (candidateLogSegments.size() > maxUploadSegmentsPerTask) {
+ candidateLogSegments = candidateLogSegments.subList(0,
maxUploadSegmentsPerTask);
+ }
Review Comment:
I think we should only add `maxUploadSegmentsPerTask` number of segments in
the method `candidateLogSegments(..)`, rather than remove segments after
`candidateLogSegments(..)`, this avoids unncessary logics.
--
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]