peakxy opened a new pull request, #725: URL: https://github.com/apache/hugegraph-toolchain/pull/725
## Purpose of the PR - close #496 This PR fixes the Hubble upload quota reset problem described in https://github.com/apache/hugegraph-toolchain/issues/496. Previously, uploaded file size was effectively accumulated across historical jobs, and deleting an old import job did not fully release the occupied upload quota. As a result, once the historical uploaded files exceeded 10GB, users could no longer continue uploading files in the web UI or reset the quota by removing old jobs. ## Main Changes - Change backend upload quota validation from global historical scope to current job scope by using `JobManager.jobSize` instead of relying on global file history. - Add the `size` request parameter in the upload flow so the backend can validate the original file size instead of only seeing chunk sizes. - Complete cascading cleanup when deleting an import job, including related `LoadTask` records, `FileMapping` metadata, and uploaded files on disk, so deleting an old job can actually release the quota. - Align frontend cumulative size validation with backend behavior by counting uploaded files, queued local files, and newly selected files in the same job. - Keep `total_size_bytes` as the raw byte field required by frontend quota calculation, remove the redundant `job_size_bytes` field, and deduplicate the related i18n message key. ## Verifying these changes - [ ] Trivial rework / code cleanup without any test coverage. (No Need) - [ ] Already covered by existing tests, such as *(please modify tests here)*. - [x] Need tests and can be verified as follows: - Create an import job in Hubble and upload files in multiple batches; verify that upload is allowed until the cumulative size of the current job exceeds 10GB. - Create a historical job with large uploaded files, then create a new job and upload a small file; verify that the new job is not blocked by historical jobs. - Delete an old job with uploaded files, then create a new job and continue uploading; verify that the quota is released after the old job is removed. - Run `git diff --check` to confirm there is no formatting issue in the current diff. ## Does this PR potentially affect the following parts? - [ ] Nope - [ ] Dependencies (add/update license info) - [ ] Modify configurations - [ ] The public API - [x] Other affects (Hubble data import upload quota validation, job cleanup flow, and related frontend/backend upload interaction) ## Documentation Status - [ ] `Doc - TODO` - [x] `Doc - Done` - [ ] `Doc - No Need` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
