Skip to content

CLDSRV-992: Bound and settle the 1000-object writes in Multi-Object Delete setup - #6278

Draft
anurag4DSB wants to merge 1 commit into
development/9.3from
improvement/CLDSRV-992-multiobjectdelete-bounded-writes
Draft

CLDSRV-992: Bound and settle the 1000-object writes in Multi-Object Delete setup#6278
anurag4DSB wants to merge 1 commit into
development/9.3from
improvement/CLDSRV-992-multiobjectdelete-bounded-writes

Conversation

@anurag4DSB

@anurag4DSB anurag4DSB commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The Multi-Object Delete Success setup uploads 1000 objects behind what looks like a concurrency limiter of 20, and it is not one. objects.map() invokes all 1000 async calls synchronously; the first 20 push and the other 980 park on the same Promise.race, then on the first settle each waiter splices one entry off the head of the queue regardless of whether that entry had settled, so the queue empties and the remaining puts all fire together. Lifting the limiter verbatim into a harness with an instrumented stub gives a peak of 999 concurrent puts against an intended 20, which is where the ServiceUnavailable and the Socket timed out without establishing a connection within 5000 ms come from.

It also explains why one failure becomes seven. Promise.all rejects on the first error while the other puts are still in flight, so the hook throws with writes outstanding; teardown then empties the bucket, the stragglers land, and deleteBucket fails with BucketNotEmpty. All four suites in the file share the bucket name multi-object-delete-234-634, so once it is left behind non-empty every later suite's cleanup fails the same way.

The limiter becomes a fixed pool of 20 workers draining a shared queue, so concurrency is genuinely bounded and every put has settled before the hook returns, including on the failure path. Errors are collected and the first is rethrown, so the diagnostic CI reports is unchanged. The replacement measures a peak of exactly 20 with nothing in flight at return, on the happy path and with an injected mid-run failure. Clears row F1's two Multi-Object Delete hooks; hotfix/9.2.36 needs this plus a cleanup change it never received, in #6279.

@bert-e

bert-e commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Hello anurag4dsb,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/bypass_source_branch_lineage Bypass the cross-branch contamination check
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue CLDSRV-992 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.3.21

  • 9.4.4

  • 9.5.0

Please check the Fix Version/s of CLDSRV-992, or the target
branch of this pull request.

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
8504 1 8503 0
View the full list of 1 ❄️ flaky test(s)
"before each" hook for "should get a range from the second part of an object"::aws-node-sdk range tests aws-node-sdk range test for object put by MPU With default signature "before each" hook for "should get a range from the second part of an object"

Flake rate in main: 20.00% (Passed 4 times, Failed 1 times)

Stack Traces | 30.1s run time
Error uploading part 1: Connection timed out after 30000 ms

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Comment thread .github/workflows/tests.yaml Outdated
async-migration-report:
runs-on: ubuntu-24.04
if: startsWith(github.ref, 'refs/heads/development/')
if: false # CLDSRV-992 stress: unrelated job

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This file contains stress-testing scaffolding that should be reverted before merge:

  • 11 jobs disabled with if: false (async-migration-report, multiple-backend, mongo-v0, mongo-v1, file-ft, utapi-v2, sur, kmip, kmip-cluster, sse-kms-migration, end-of-pipeline aggregation). Merging this removes most of the CI safety net on development/9.3.
  • s3c-ft-tests matrix drops the v0 and v0-null-compat variants and duplicates v1 10 times. v0 format test coverage would be lost.
  • The end-of-pipeline aggregation job changes from if: always() to if: false, silently dropping the merge gate.

Only the multiObjectDelete.js change should ship; the workflow changes should be reverted to their base-branch state.

…elete setup

The "Multi-Object Delete Success" beforeEach uploads 1000 objects behind what
looks like a concurrency limiter of 20. It is not one. objects.map() invokes all
1000 async calls synchronously; the first 20 push and the other 980 all park on
the same `await Promise.race(queued)`. When the first put settles they all wake,
and each splices one entry off the head of the queue regardless of whether that
entry had settled, so the queue empties, every waiter's `while` test goes false,
and the remaining puts fire together. Running the limiter against an
instrumented stub gives a peak of 999 concurrent puts against an intended 20.

That is the ServiceUnavailable and the "Socket timed out without establishing a
connection within 5000 ms" seen in CI: a thousand simultaneous puts, not twenty.

It also explains why one failure becomes seven. Promise.all rejects on the first
error while the other puts are still in flight, so the hook throws with writes
outstanding. Teardown then empties the bucket, the stragglers land, and
deleteBucket fails with BucketNotEmpty. All four suites in this file share the
bucket name multi-object-delete-234-634, so once it is left behind with objects
in it, every later suite's cleanup fails the same way.

Replace the limiter with a fixed pool of 20 workers draining a shared queue.
Concurrency is genuinely bounded, and every put is settled before the hook
returns, on the failure path too, so teardown can no longer race them. Errors
are collected and the first is rethrown, which keeps the diagnostic the hook
previously reported.

Clears CLDSRV-992 rows F1 (its two Multi-Object Delete hooks, run 33734792029)
and F10 (all seven failures, run 33681270087, fixed for the 9.2 line separately).

Issue: CLDSRV-992
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-992-multiobjectdelete-bounded-writes branch 2 times, most recently from 57f5b07 to 9d47a15 Compare September 8, 2026 11:02
@anurag4DSB
anurag4DSB marked this pull request as ready for review September 8, 2026 11:02
@anurag4DSB
anurag4DSB marked this pull request as draft September 8, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants