diff --git a/src/main/java/com/woowacamp/storage/domain/file/service/FileWriterThreadPool.java b/src/main/java/com/woowacamp/storage/domain/file/service/FileWriterThreadPool.java index 6e4b543..10ac45d 100644 --- a/src/main/java/com/woowacamp/storage/domain/file/service/FileWriterThreadPool.java +++ b/src/main/java/com/woowacamp/storage/domain/file/service/FileWriterThreadPool.java @@ -77,7 +77,6 @@ public void produce(InitiateMultipartUploadResult initResponse, String currentFi log.info("current queue size: {}", workQueue.size()); long start = System.currentTimeMillis(); uploadPart(initResponse.getUploadId(), currentFileName, partNumber, contentBuffer, bufferLength, partETags); - log.info("uploadPart execute time: {}", System.currentTimeMillis() - start); AtomicInteger currentConsumeCount = currentPartCountMap.get(currentFileName); if (currentConsumeCount != null) { currentConsumeCount.incrementAndGet(); @@ -87,6 +86,7 @@ public void produce(InitiateMultipartUploadResult initResponse, String currentFi && currentConsumeCount.get() >= maxConsumeCount) { completeFileUpload(initResponse.getUploadId(), currentFileName, partETags); } + log.info("uploadPart execute time: {}", System.currentTimeMillis() - start); }); } diff --git a/src/main/java/com/woowacamp/storage/global/constant/CommonConstant.java b/src/main/java/com/woowacamp/storage/global/constant/CommonConstant.java index 33f8287..201b135 100644 --- a/src/main/java/com/woowacamp/storage/global/constant/CommonConstant.java +++ b/src/main/java/com/woowacamp/storage/global/constant/CommonConstant.java @@ -5,7 +5,7 @@ public class CommonConstant { public static final Character[] FILE_NAME_BLACK_LIST = {'\\', '/', ':', '*', '?', '"', '<', '>', '|'}; public static final int MAX_FOLDER_DEPTH = 50; - public static final int FILE_WRITER_CORE_POOL_SIZE = 150; + public static final int FILE_WRITER_CORE_POOL_SIZE = 20; public static final int FILE_WRITER_MAXIMUM_POOL_SIZE = 200; public static final int FILE_WRITER_KEEP_ALIVE_TIME = 10; public static final int FILE_WRITER_QUEUE_SIZE = 400;