Github user aljoscha commented on a diff in the pull request: https://github.com/apache/flink/pull/5860#discussion_r185732573 --- Diff: flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java --- @@ -473,6 +482,15 @@ private boolean shouldRoll(BucketState<T> bucketState) throws IOException { subtaskIndex, writePosition, batchSize); + } else { + long currentProcessingTime = processingTimeService.getCurrentProcessingTime(); --- End diff -- You should pass in the current processing time to avoid calling this somewhat costly method twice.
---