Repository navigation
Add TaskTracker::addFinal and async S3 multipart upload - #105487
Conversation
|
Workflow [PR], commit [238105b] Summary: ❌
AI ReviewSummaryThis PR adds PR Metadata
Findings❌ Blockers
Tests
Final VerdictStatus: ❌ Block Minimum required action: make the missing- |
| @@ -39,6 +39,11 @@ class TaskTracker | |||
|
|
|||
| void add(Callback && func); | |||
There was a problem hiding this comment.
lets harden the add method: if the final task is set, then no new ordinary task could be added. It is logical error.
| else | ||
| { | ||
| writeMultipartUpload(); | ||
| task_tracker->addFinal([this]() |
There was a problem hiding this comment.
cool, all the changes and difficulties are in the common tool.
| if (tag.empty()) | ||
| throw Exception( | ||
| ErrorCodes::LOGICAL_ERROR, | ||
| ErrorCodes::S3_ERROR, |
There was a problem hiding this comment.
No longer a logical error -- we now reach completeMultipartUpload even if an earlier upload fails. Need to throw in this case.
Per the logic in TaskTracker, the earlier upload failure will be surfaced first.
There was a problem hiding this comment.
You are right here.
lets do not throw ErrorCodes::S3_ERROR, this is not the error from s3 client and not the error at all
we could throw some generic like canceled + due to previous errors or even just ignore it and do not set the flag that MPU is finished. But later we need to make sure that is MPU is not finished that we have some error from previous steps.
There was a problem hiding this comment.
MPU will not be marked as finished if we throw from this function. And sure, will change to a more generic code.
fe53a42 to
05b68ff
Compare
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 155/156 (99.36%) | Lost baseline coverage: none · Uncovered code |
Add TaskTracker::addFinal and async S3 multipart upload
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Complete the final S3 multipart upload request asynchronously via the task tracker, so it can overlap with the last part upload instead of running serially in finalize.
Version info
26.6.1.307