Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<FileMapping> 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));
Comment on lines 278 to 283
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The total upload limit is now computed by summing total_size across all FileMapping records for the connection. Since completed mappings are persisted (and totalSize is set on completion), this quota becomes cumulative across jobs and won’t “reset” when a new job is created, which seems to be the core problem described in #496. Consider scoping the sum to the current job (conn_id + job_id), or using jobEntity.getJobSize() (which is already maintained on upload/delete) so the limit is enforced per job and naturally resets between jobs.

Copilot uses AI. Check for mistakes.
}

Expand Down
Loading