diff --git a/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/controller/load/FileUploadController.java b/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/controller/load/FileUploadController.java index ea29b74d1..b37dcc6e0 100644 --- a/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/controller/load/FileUploadController.java +++ b/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/controller/load/FileUploadController.java @@ -277,12 +277,9 @@ private void checkFileValid(int connId, int jobId, JobManager jobEntity, long totalFileSizeLimit = this.config.get( HubbleOptions.UPLOAD_TOTAL_FILE_SIZE_LIMIT); - List fileMappings = this.service.listAll(); - long currentTotalSize = fileMappings.stream() - .map(FileMapping::getTotalSize) - .reduce(0L, (Long::sum)); + long currentTotalSize = jobEntity.getJobSize(); Ex.check(fileSize + currentTotalSize <= totalFileSizeLimit, - "load.upload.file.exceed-single-size", + "load.upload.file.exceed-total-size", FileUtils.byteCountToDisplaySize(totalFileSizeLimit)); }