Skip to content

Cherry pick #119054 to 26.3: Fix unbound read in Azure::readBigAt - #124264

Merged
robot-ch-test-poll merged 10 commits into
backport/26.3/119054from
cherrypick/26.3/119054
Oct 9, 2026
Merged

robot-ch-test-poll merged 10 commits into
backport/26.3/119054from
cherrypick/26.3/119054

Conversation

@robot-ch-test-poll2

Copy link
Copy Markdown
Contributor

Original pull-request #119054

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

arsenmuk and others added 9 commits September 9, 2026 17:00
…g a full read

`readBigAt` returned the requested size even when the response bodies kept
ending prematurely and the retry loop ran out of attempts, so callers such as
`Parquet::Prefetcher::readSync` could not detect the truncation. Return the
accumulated byte count, like the S3 and HTTP implementations.
… hit a null client

`readBigAt` dereferenced `blob_client` unconditionally, while the client was
only created lazily by `initialize` or `tryGetFileSize`, so a caller following
the documented `supportsReadAt` handshake could hit a null pointer. Route every
user through `getBlobClient`, which creates the client under `std::call_once`:
`readBigAt` is `const` and may be called from multiple threads in parallel, and
creating the client is cheap (it only composes the blob URL, no request is
made). Also make the regression test exercise the documented handshake instead
of forcing a `getFileSize` call.
The existing test only served responses at least as long as requested, so it
exercised the overlong-body clamp but left the short-count return unproved: a
regression to returning the requested size after a truncated Azure response
would still have passed. Parameterize the mock transport by advertised vs.
served size and add a case whose body ends early, asserting `readBigAt` returns
the accumulated byte count and leaves the unread tail untouched.
…-read

Fix unbound read in Azure::readBigAt
@robot-ch-test-poll2 robot-ch-test-poll2 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels Oct 6, 2026
Keep the branch sequential-read and remote-size code while applying the lazy blob client, bounded positioned read, and both regression tests from the original change.

Related: #119054

Related: #124264
@robot-ch-test-poll
robot-ch-test-poll merged commit 7332612 into backport/26.3/119054 Oct 9, 2026
1 check passed
@robot-ch-test-poll
robot-ch-test-poll deleted the cherrypick/26.3/119054 branch October 9, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants