Skip to content

Commit

Permalink
Revert to be safe
Browse files Browse the repository at this point in the history
  • Loading branch information
aokolnychyi committed Sep 12, 2024
1 parent 129f937 commit 97ed25f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/apache/iceberg/SnapshotProducer.java
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ private static <T> List<List<T>> divide(List<T> list, int groupCount) {
*/
@VisibleForTesting
static int manifestWriterCount(int workerPoolSize, int fileCount) {
int limit = Math.max(1, IntMath.divide(fileCount, MIN_FILE_GROUP_SIZE, RoundingMode.HALF_UP));
return Math.min(workerPoolSize, limit);
int limit = IntMath.divide(fileCount, MIN_FILE_GROUP_SIZE, RoundingMode.HALF_UP);
return Math.max(1, Math.min(workerPoolSize, limit));
}

private static ManifestFile addMetadata(TableOperations ops, ManifestFile manifest) {
Expand Down

0 comments on commit 97ed25f

Please sign in to comment.