Skip to content

Fix broken_promise abort when scheduling the final S3 multipart upload task fails - #108730

Merged
alexey-milovidov merged 6 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-tasktracker-broken-promise-on-schedule-failure
Jul 3, 2026
Merged

alexey-milovidov merged 6 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-tasktracker-broken-promise-on-schedule-failure

Conversation

@groeneai

@groeneai groeneai commented Jun 28, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #105487

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix a std::future_error ("The associated promise has been destructed prior to the associated state becoming ready") that could surface, and abort the server in debug/sanitizer builds, when scheduling the final asynchronous S3/Azure multipart-upload completion task failed (for example under thread-pool exhaustion). The real scheduling error is now reported instead.

Description

Found by the Stress test (std::future_error code 1001, STID 2508-3dee and siblings); a chronic stress-test finding across all sanitizers, not tied to any single PR.

TaskTracker::addFinal stores the future of the final task (the async WriteBufferFromS3::completeMultipartUpload) in futures before the task is scheduled. When the scheduler (threadPoolCallbackRunnerUnsafe -> ThreadPool::scheduleOrThrowOnError) threw CANNOT_SCHEDULE_TASK -- which the stress test injects via the thread fuzzer (cannot_allocate_thread_fault_injection_probability), and which can also happen on a genuinely exhausted pool -- the final std::packaged_task was destroyed without ever running. That left the already-stored future with a broken promise, so waitAll() threw std::future_error (a std::logic_error) instead of the real CANNOT_SCHEDULE_TASK. getCurrentExceptionMessageAndPattern aborts on any std::logic_error in debug/sanitizer builds, so a background merge that wrote its result to S3 aborted the server (in release builds the merge would instead fail with a misleading error).

Both schedule sites (the SCOPE_EXIT in add() and the run-now branch in addFinal()) now go through a new scheduleFinalTask() helper, which runs the final task inline if scheduling fails. The task's future then always carries a proper result or the actual exception, so waitAll() surfaces the real error and the background merge is retried normally instead of aborting.

Reproduced locally with a MinIO-backed S3 disk and cannot_allocate_thread_fault_injection_probability enabled: concurrent INSERT + OPTIMIZE FINAL on an S3-backed table aborted the server with the broken_promise future_error before the fix, and runs to completion (failures surface as the normal retryable CANNOT_SCHEDULE_TASK) after it. A unit test in gtest_thread_pool_task_tracker.cpp exercises both schedule sites with a scheduler that throws on the final-task schedule and asserts no future_error is produced (it fails with future_error without the fix).

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108560&sha=fe57785cb9a849029b54f7f5334da0911d7877a5&name_0=PR&name_1=Stress%20test%20%28arm_debug%29

Version info

  • Merged into: 26.7.1.489 (included in 26.7 and later)

…d task fails

TaskTracker::addFinal stores the future of the final task (the async S3/Azure
completeMultipartUpload) in `futures` before the task is scheduled. When the
scheduler (threadPoolCallbackRunnerUnsafe -> scheduleOrThrowOnError) threw
CANNOT_SCHEDULE_TASK -- which the stress test injects via the thread fuzzer, and
which can also happen on a genuinely exhausted pool -- the final packaged_task was
destroyed without running. That left the stored future with a broken promise, so
waitAll() threw std::future_error (a std::logic_error) instead of the real
CANNOT_SCHEDULE_TASK. In debug and sanitizer builds getCurrentExceptionMessage
aborts on any std::logic_error, so a background merge that wrote its result to S3
aborted the server.

Both schedule sites (the SCOPE_EXIT in add() and the run-now branch in addFinal())
now go through scheduleFinalTask(), which runs the final task inline if scheduling
fails. The task's future then always carries a proper result or the actual
exception, so waitAll() surfaces the real error and the background merge is retried
normally instead of aborting.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. MinIO-backed s3_disk + cannot_allocate_thread_fault_injection_probability + SYSTEM START THREAD FUZZER, then concurrent INSERT + OPTIMIZE TABLE ... FINAL on the S3 table. Server aborts with future_error (broken_promise). Also a deterministic gtest with a scheduler that throws on the final-task schedule.
b Root cause explained? TaskTracker::addFinal stores the final task's future in futures before scheduling it. When scheduleOrThrowOnError throws CANNOT_SCHEDULE_TASK, the final packaged_task is destroyed unrun, so the stored future has a broken promise. waitAll().get() then throws future_error (a std::logic_error), which aborts in debug/sanitizer via getCurrentExceptionMessageAndPattern, masking the real scheduling error.
c Fix matches root cause? Yes. On schedule failure both schedule sites now run the final task inline (scheduleFinalTask), so its future is always fulfilled (with the upload result or the real exception). No future is ever left broken.
d Test intent preserved / new tests added? New: 3 unit tests in gtest_thread_pool_task_tracker.cpp exercising the SCOPE_EXIT and addFinal schedule-failure paths and the final-callback-exception propagation. Existing 9 TaskTracker tests unchanged and still pass.
e Both directions demonstrated? Yes. Without fix: 3 new tests FAIL (waitAll throws future_error); end-to-end S3 stress aborts the server. With fix: all 12 tests pass; same S3 stress (1261 injected CANNOT_SCHEDULE faults, 3 rounds) leaves the server alive, 0 broken_promise.
f Fix is general across code paths? Yes. Both places that schedule the final task (the add() SCOPE_EXIT and the addFinal() run-now branch) route through the single scheduleFinalTask helper; neither can leave a broken promise now.
g Fix generalizes across inputs? N/A for input types. The defect is in async task scheduling, independent of column/data types. It is exercised by any TaskTracker user (S3 and Azure multipart uploads) since the helper is shared.
h Backward compatible? Yes. No setting, format, or protocol change. Pure error-handling fix: a scheduling failure now surfaces the genuine CANNOT_SCHEDULE_TASK (retryable) instead of an abort/misleading future_error.
i Invariants and contracts preserved? Yes. The final task still runs exactly once and its future is always satisfied (the TaskTracker contract waitAll() relies on). The inline run happens after the mutex is released (SCOPE_EXIT) so no lock-ordering change; packaged_task::operator() never throws, so SCOPE_EXIT stays noexcept.

Session id: cron:clickhouse-worker-slot-1:20260628-040200

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @asya-ch @kssenii — could you review this? It fixes the broken_promise future_error abort from the async S3 multipart-upload final task (added in #105487): when scheduling the final task throws CANNOT_SCHEDULE_TASK, the stored future was left broken and aborted the server in debug/sanitizer builds instead of surfacing the real scheduling error. The fix runs the final task inline on schedule failure.

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Jun 28, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 28, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ef5ba23]

Summary: ✅


AI Review

Summary

This PR replaces the final addFinal task's bare std::packaged_task with an explicit FinalTaskState, so waitAll() now reports the real scheduler failure or queued-drop condition instead of a broken-promise std::future_error. The current revision also fixes the follow-up cleanup ordering issue from review by routing the scheduler-throw path through the same destructor-based release-then-satisfy path as the queued-drop case. I did not find any remaining correctness or contract issues in the current diff.

Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jun 28, 2026
Comment thread src/Common/ThreadPoolTaskTracker.cpp Resolved
groeneai and others added 2 commits June 28, 2026 20:50
…duleFinalTask

The Style check flagged the catch (...) in TaskTracker::scheduleFinalTask as
silently swallowing exceptions. The catch is intentional: when the scheduler
throws (e.g. CANNOT_SCHEDULE_TASK from thread-fuzzer fault injection) we run the
final packaged_task inline so its future is always fulfilled, rather than
letting it be destroyed unrun and turn into a broken promise. The catch_all
linter inspects only the catch body and the two lines preceding it, so the
detailed rationale that lived above the try was out of range; move a concise
justification (with an 'Ok' marker the linter accepts) into the catch body.

Comment-only change, no behavior change.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ing inline

The previous fix ran the final task inline when scheduling it threw. That
masked the real scheduling error: the inline run succeeded, so the stored
future succeeded too, and waitAll() never reported the CANNOT_SCHEDULE_TASK
that triggered the path. It also left a second gap: if the pool accepted the
final lambda and then dropped it unrun during shutdown, the discarded scheduler
future could not satisfy the stored future, and destroying the captured
packaged_task re-introduced the std::future_error broken_promise.

Introduce a small FinalTaskState (an explicit promise plus the callback,
mirroring detail::CallbackRunnerTask) whose future is the one stored in
`futures`. The promise is satisfied on every outcome:
  - run() sets value/exception from the callback;
  - a pre-enqueue scheduler throw satisfies it with the scheduling exception,
    so waitAll() surfaces CANNOT_SCHEDULE_TASK instead of a masking success;
  - a queued-drop (state released without run()) satisfies it from
    ~FinalTaskState with a normal CANNOT_SCHEDULE_TASK Exception, never a
    broken-promise std::future_error.

Rework the gtests accordingly: the schedule-failure cases now assert waitAll()
observes CANNOT_SCHEDULE_TASK (not success, not std::future_error), covering
both the addFinal run-now site and the async SCOPE_EXIT site, plus a
deterministic queued-drop case. All three fail on the old inline-run code and
pass with this change.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. Three gtests deterministically model the two failure modes via mock schedulers: a scheduler that throws CANNOT_SCHEDULE_TASK on the Nth call (pre-enqueue), and one that accepts the callback then drops it unrun (queued-drop). No timing dependence; 200x repeat is clean.
b Root cause explained? Yes. The final task's future was a std::packaged_task future stored in futures before scheduling. (1) On a pre-enqueue scheduler throw the old code ran the task inline, so the future succeeded and waitAll() never reported CANNOT_SCHEDULE_TASK (masked). (2) If the pool accepted the lambda then drained it unrun at shutdown, the discarded scheduler future could not satisfy the stored future and destroying the captured packaged_task stored a broken-promise std::future_error (a std::logic_error -> LOGICAL_ERROR -> abort in debug/sanitizer).
c Fix matches root cause? Yes. Replaces the bare packaged_task with FinalTaskState (explicit promise + callback). The promise is satisfied on every outcome: run() from the callback; pre-enqueue throw -> set_exception(scheduler exc); queued-drop -> ~FinalTaskState sets a normal CANNOT_SCHEDULE_TASK. No inline run; the future carries the scheduler result.
d Test intent preserved / new tests added? Yes. The pre-existing happy-path / prior-failure / inflight-limit / sync-runner tests are unchanged. The three stale schedule-failure tests (which asserted the wrong inline-run success behavior) are rewritten to assert waitAll() observes CANNOT_SCHEDULE_TASK, and a deterministic queued-drop test is added.
e Both directions demonstrated? Yes. Against the previous inline-run code all three new tests FAIL (first two: "scheduling failure masked as success"; third: broken-promise std::future_error). With this change all 12 TaskTrackerAddFinal.* pass, 200x repeat clean. Build-verified by stashing only the .cpp/.h fix and rebuilding.
f Fix is general across code paths? Yes. Both schedule sites route through scheduleFinalTask (addFinal run-now branch + add()'s SCOPE_EXIT branch), and the queued-drop is handled in ~FinalTaskState independent of call site. Mirrors the already-merged detail::CallbackRunnerTask fix (#107383) for the sibling runner, so the two broken-promise paths in this area are now consistent.
g Fix generalizes across inputs? Yes. The promise is std::promise<void> (the final task is always void()); there are no type/parameter variants. The three outcome paths (run-success, run-exception, pre-enqueue-throw, queued-drop) are the complete input space and each is covered. The destructor also handles the boundary where building the DB::Exception itself throws (e.g. bad_alloc under shutdown), falling back to the in-flight exception so the promise is never left unset.
h Backward compatible? Yes. Internal src/Common implementation detail of TaskTracker; no settings, no on-disk/wire/replication format, no public API change. Behavior change is strictly bug-for-correct: a scheduling failure now surfaces CANNOT_SCHEDULE_TASK instead of aborting or masking.
i Invariants and contracts preserved? Yes. The TaskTracker invariant "every future stored in futures is eventually satisfied exactly once" is upheld on all paths: was_run is set before the only other writer (the destructor) can act, so set_exception/set_value is called exactly once. add()'s SCOPE_EXIT runs under DENY_ALLOCATIONS_IN_SCOPE only while holding mutex; scheduling (which may allocate) happens after the lock is released, unchanged. The callback's captures are released before satisfying the promise (same ordering as run()) to avoid a waiter racing with capture teardown.

Session id: cron:clickhouse-worker-slot-3:20260628-215700

@groeneai

groeneai commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — 97bdc98

Every failure below has an owner: a fixing PR (ours or external). Only CH Inc sync is exempt. None is caused by this PR, which touches only src/Common/ThreadPoolTaskTracker.cpp and a unit test.

Check / test Reason Owner / fixing PR
AST fuzzer (amd_debug) / STID 1941-26fa Inconsistent AST formatting flaky (chronic trunk: 4 master / 32 PRs / 30d) #108915 (ours, open)
Stateless tests (arm_binary, parallel) / 04204_global_in_join_max_rows_to_transfer_103333 flaky (connection-desync family) #108854 (external, open)
Stress test (amd_tsan) / Hung check failed, possible deadlock deadlock (chronic family) #108212 (ours, merged) / #105905 (ours, open)
Stress test (arm_tsan) / Hung check failed, possible deadlock deadlock (chronic family) #108212 (ours, merged) / #105905 (ours, open)
Mergeable Check, PR rollup of the reds above owned via the PRs listed above
CH Inc sync - CH Inc sync (private, not actionable)

Session id: cron:our-pr-ci-monitor:20260701-120000

Comment thread src/Common/ThreadPoolTaskTracker.cpp Resolved
Addresses clickhouse-gh[bot] review on scheduleFinalTask: was_run=true made the
scheduler-throw catch satisfy the promise inline and then let raw member
~std::function free the callback, so that path did not share the
release-then-satisfy cleanup run() and the queued-drop case use. Record the
scheduler exception in a new schedule_error field and leave was_run false, so
~FinalTaskState releases the callback (under SCOPE_EXIT_SAFE) before satisfying
the promise, and surfaces the real CANNOT_SCHEDULE_TASK. All three not-run paths
now share one cleanup invariant.

gtest: assert waitAll() surfaces the scheduler's own exception (code and
message), not a synthesized one, pinning the schedule_error bridge.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
auto-merge was automatically disabled July 3, 2026 01:11

Head branch was pushed to by a user without write access

@groeneai

groeneai commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. gtest TaskTrackerAddFinal.FinalTaskScheduleFailureSurfacesSchedulerException deterministically drives the scheduler-throw path (a scheduler that throws CANNOT_SCHEDULE_TASK on the final task's schedule) and asserts waitAll() surfaces the scheduler's real exception. Passes 50/50.
b Root cause explained? Yes. In scheduleFinalTask's catch, was_run = true short-circuited ~FinalTaskState, so the scheduler-throw path satisfied the promise inline and then freed the callback via raw member ~std::function, not through the release-then-satisfy block run() and the queued-drop case use. The three not-run/failure paths did not share one cleanup path.
c Fix matches root cause? Yes. New schedule_error member records the scheduler exception; was_run stays false so ~FinalTaskState runs the same SCOPE_EXIT_SAFE release then satisfies the promise, preferring schedule_error. No inline run, no raw-member release on that path.
d Test intent preserved / new tests added? Yes. All existing TaskTrackerAddFinal.* tests unchanged and green. Added one regression test asserting the scheduler's own error (code AND message) is surfaced, not a synthesized one.
e Both directions demonstrated? Yes. Test passes with the fix; against a naive destructor-only variant that drops schedule_error and synthesizes a generic message it FAILS (got: Final task was dropped before execution instead of scheduler refused the task), confirming it pins the schedule_error bridge.
f Fix is general across code paths? Yes. The change unifies all three FinalTaskState not-run/failure paths (run(), scheduler-throw, queued-drop) onto one cleanup path, rather than patching a single site. No sibling code duplicates the old short-circuit.
g Fix generalizes across inputs? Yes. FinalTaskState is type-agnostic (Callback = std::function<void()>); the fix does not depend on the callback's captured types. Verified for both scheduleFinalTask call sites (addFinal run-now and the async add() SCOPE_EXIT) and the queued-drop path.
h Backward compatible? Yes, N/A for on-disk/wire/settings. Purely internal refactor of one struct in clickhouse_common_io; no setting, format, or public behavior change. waitAll() still surfaces CANNOT_SCHEDULE_TASK on schedule failure as before.
i Invariants and contracts preserved? Yes. The promise is satisfied exactly once on every path (run() sets was_run first; the destructor only satisfies when was_run is false). Release-then-satisfy ordering now holds on all three paths. Note (documented in the review reply): SCOPE_EXIT_SAFE does not contain a throwing std::function capture destructor on any path (~std::function is noexcept), so this is a consistency/ordering fix, not a throwing-dtor-survival change.

Session id: cron:clickhouse-worker-slot-2:20260702-225100

@clickhouse-gh

clickhouse-gh Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.50% 85.50% +0.00%
Functions 92.60% 92.70% +0.10%
Branches 77.70% 77.70% +0.00%

Changed lines: Changed C/C++ lines covered: 139/147 (94.56%) · Uncovered code

Full report · Diff report

@groeneai

groeneai commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — ef5ba23

CI fully finished (Finish Workflow + Mergeable Check pass). All checks green; no failures to own.

Check / test Reason Owner / fixing PR
(none) — all green

Session id: cron:our-pr-ci-monitor:20260703-053000

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 3, 2026
Merged via the queue into ClickHouse:master with commit 9baaf47 Jul 3, 2026
174 checks passed
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 3, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Jul 8, 2026
…read that owns a group

threadPoolCallbackRunnerUnsafe wraps each callback in a CallbackRunnerTask
shared_ptr and schedules it via ThreadPool::scheduleOrThrowOnError. When that
schedule call throws (e.g. the pool is shutting down, or the thread fuzzer
injects cannot_allocate_thread under stress), the not-yet-queued task
shared_ptr is destroyed during stack unwinding, synchronously on the
scheduling thread.

~CallbackRunnerTask() runs a ThreadGroupSwitcher to release the callback's
captures under the task's thread group. It was constructed with the default
allow_existing_group=false, whose contract is "assert the thread is not already
attached to a different group" -- correct for run() (which only ever executes
on a clean pool worker) but wrong for the destructor, which can also run on the
scheduling thread. That thread is a normal query thread and already owns its
own thread group, so the switcher threw
LOGICAL_ERROR "Thread is already attached to a group (master_thread_id N)".
A LOGICAL_ERROR is reported via abortOnFailedAssertion in debug/sanitizer
builds, so the server aborted.

Observed in Stress test (arm_tsan), STID 4298-42a4: DROP TABLE ->
StorageMergeTree::shutdown -> MergeTreeDeduplicationLog::shutdown ->
WriteBufferFromS3::makeSinglepartUpload -> TaskTracker::add ->
scheduleOrThrowOnError throws -> ~CallbackRunnerTask on the DROP query thread.

Pass allow_existing_group=true in the destructor: it remembers the scheduling
thread's group and restores it after releasing the callback. No behavior change
on the pool drain thread (a null/identical group is still a no-op). run() keeps
allow_existing_group=false unchanged.

This is distinct from and complementary to ClickHouse#108730 (which fixes a broken-promise
future_error in TaskTracker::addFinal, a higher layer in ThreadPoolTaskTracker.cpp);
this abort is one layer deeper, in the generic CallbackRunnerTask destructor shared
by every threadPoolCallbackRunnerUnsafe caller, and would still fire with ClickHouse#108730
merged.

A unit test in gtest_thread_group_switcher.cpp destroys an unrun
CallbackRunnerTask on a thread that already owns a group and asserts the process
does not abort and the thread's original group is restored. It aborts without
this fix and passes with it.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Jul 8, 2026
…read that owns a group

threadPoolCallbackRunnerUnsafe wraps each callback in a CallbackRunnerTask
shared_ptr and schedules it via ThreadPool::scheduleOrThrowOnError. When that
schedule call throws (e.g. the pool is shutting down, or the thread fuzzer
injects cannot_allocate_thread under stress), the not-yet-queued task
shared_ptr is destroyed during stack unwinding, synchronously on the
scheduling thread.

~CallbackRunnerTask() runs a ThreadGroupSwitcher to release the callback's
captures under the task's thread group. It was constructed with the default
allow_existing_group=false, whose contract is "assert the thread is not already
attached to a different group" -- correct for run() (which only ever executes
on a clean pool worker) but wrong for the destructor, which can also run on the
scheduling thread. That thread is a normal query thread and already owns its
own thread group, so the switcher threw
LOGICAL_ERROR "Thread is already attached to a group (master_thread_id N)".
A LOGICAL_ERROR is reported via abortOnFailedAssertion in debug/sanitizer
builds, so the server aborted.

Observed in Stress test (arm_tsan), STID 4298-42a4: DROP TABLE ->
StorageMergeTree::shutdown -> MergeTreeDeduplicationLog::shutdown ->
WriteBufferFromS3::makeSinglepartUpload -> TaskTracker::add ->
scheduleOrThrowOnError throws -> ~CallbackRunnerTask on the DROP query thread.

Pass allow_existing_group=true in the destructor: it remembers the scheduling
thread's group and restores it after releasing the callback. No behavior change
on the pool drain thread (a null/identical group is still a no-op). run() keeps
allow_existing_group=false unchanged.

This is distinct from and complementary to ClickHouse#108730 (which fixes a broken-promise
future_error in TaskTracker::addFinal, a higher layer in ThreadPoolTaskTracker.cpp);
this abort is one layer deeper, in the generic CallbackRunnerTask destructor shared
by every threadPoolCallbackRunnerUnsafe caller, and would still fire with ClickHouse#108730
merged.

A unit test in gtest_thread_group_switcher.cpp destroys an unrun
CallbackRunnerTask on a thread that already owns a group and asserts the process
does not abort and the thread's original group is restored. It aborts without
this fix and passes with it.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author

@alexey-milovidov could you apply v26.6-must-backport to this PR? The fix is missing from 26.6 and the abort is still firing there.

Three hits since this merged, all on 26.6, including the release branch itself: the 26.6 branch on 2026-07-17 (26.6.2.73, Stress test (amd_asan_ubsan)), and #113815 on 2026-08-07 plus #114392 on 2026-08-13 (both 26.6.3.1, Stress test (amd_tsan)). Master has had none since the merge. Report for the latest: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=114392&sha=4f7a71c42e3203ab43d8870f94c1fc552fd170e5&name_0=BackportPR&name_1=Stress%20test%20%28amd_tsan%29

26.6 is the only affected branch. 26.7 already has the fix by ancestry, and 26.5, 26.3 and 25.8 predate #105487, so they have no addFinal final-task path to break. v26.6-must-backport expands to 26.7 and 26.6, and the 26.7 port resolves to no tree change, so only the 26.6 PR gets opened.

The port onto 26.6 has one conflict, the #include <Common/ProfileEvents.h> line added by "Make ProfileEvents.h less hot"; taking the master side is correct since 26.6 already uses that event. I simulated the resolution and it matches master occurrence for occurrence, with 26.6's own #include "config.h" preserved and the gtest going from 203 to master's 402 lines, adding the four final-task scheduling-failure cases.

zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…racker-broken-promise-on-schedule-failure

Fix broken_promise abort when scheduling the final S3 multipart upload task fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants