Skip to content

feat(patch): Patch fixes 3.8.2#4659

Merged
PranjalC100 merged 4 commits into
v3.8.2_releasefrom
patch_fixes_3.8.2
Apr 29, 2026
Merged

feat(patch): Patch fixes 3.8.2#4659
PranjalC100 merged 4 commits into
v3.8.2_releasefrom
patch_fixes_3.8.2

Conversation

@PranjalC100

@PranjalC100 PranjalC100 commented Apr 29, 2026

Copy link
Copy Markdown
Member

Patch fixes

direct path verification (changes across 3 PRs) -

raj-prince and others added 3 commits April 29, 2026 05:53
…s becomes reliable (#4628)

* feat: add skipDirectPathEnforcement parameter to createGRPCClientHandle to allow conditional DirectPath enforcement

* chore: increase directPathDetectionTimeout from 10 seconds to 5 minutes

* simplifying a bit

* making direct-path verification non-fatal

* removing the timeout from the client creation

* minor change

* removing empty line
Fixes a memory leak in the buffered reader code during multi-block reads. Previously, if an initial block downloaded successfully but a later block failed (triggering a fallback), the reference counts on the successfully downloaded blocks were never decremented. This PR addresses the leak by catching gcsx.FallbackToAnotherReader errors and calling a new releaseInflightBlocks helper to immediately invoke callbacks and release references for any in-flight blocks.
…egy (#4635)

Updating the direct path enforcement strategy:

- For zonal buckets, log direct path verification status but do not block client creation on it
- For non-zonal buckets, block grpc client creation on direct path verification status. In case of failure in detecting direct path status, fallback to http client would happen based on the set grpc-strategy

Also, updated the timeout to 15 seconds for direct path verification.
@PranjalC100 PranjalC100 requested a review from a team as a code owner April 29, 2026 06:04
@PranjalC100 PranjalC100 removed the request for review from a team April 29, 2026 06:04
@PranjalC100 PranjalC100 added the execute-integration-tests Run only integration tests label Apr 29, 2026
@PranjalC100 PranjalC100 requested a review from charith87 April 29, 2026 06:04
@PranjalC100 PranjalC100 added the execute-integration-tests-on-zb To run E2E tests on zonal bucket. label Apr 29, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses critical stability and resource management issues. It fixes a memory leak in the buffered reader during fallback scenarios and improves the robustness of DirectPath connectivity verification for GCS clients. These changes ensure better resource cleanup and more reliable client initialization.

Highlights

  • Memory Leak Fix: Resolved a memory leak in the buffered reader by ensuring inflight blocks are properly released when a read operation falls back to another reader.
  • DirectPath Verification: Refined DirectPath connectivity verification, making it fatal for regional buckets while allowing non-fatal failures for others, and increased the detection timeout.
  • Testing: Added a new test case to verify that the buffered reader correctly handles fallback scenarios when a block download fails.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the ReadAt method in BufferedReader to manage resource cleanup via a defer block and introduces a new test case for fallback scenarios. It also modifies DirectPath connectivity logic in storage_handle.go, increasing detection timeouts and making verification non-fatal for zonal buckets. Feedback highlights potential resource leaks in ReadAt for general errors and in createGRPCClientHandle due to a missing sc.Close() call on verification failure. Additionally, it is suggested to restore the explicit timeout for NewGRPCClient to ensure fail-fast behavior.

Comment thread internal/bufferedread/buffered_reader.go
Comment thread internal/storage/storage_handle.go
Comment thread internal/storage/storage_handle.go
* feat(dp-check): removing older cp check utility

* validation package is already disabled hence removing the skip
@PranjalC100

Copy link
Copy Markdown
Member Author

/gemini review

@PranjalC100 PranjalC100 changed the title Patch fixes 3.8.2 feat(patch): Patch fixes 3.8.2 Apr 29, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the ReadAt method in buffered_reader.go to manage block reference releases via a defer block and removes the gRPCDirectPathDetector in storage_handle.go, making DirectPath verification fatal only for regional buckets. Review feedback identified a potential memory leak in ReadAt where block references might not be released for errors other than FallbackToAnotherReader. Additionally, a resource leak was found in createGRPCClientHandle where the gRPC client is not closed when verification fails for regional buckets.

Comment thread internal/bufferedread/buffered_reader.go
Comment thread internal/storage/storage_handle.go
@charith87 charith87 removed their request for review April 29, 2026 07:13

@abhishek10004 abhishek10004 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM (Checked with Pranjal and these commits were cherry picked)

@PranjalC100

Copy link
Copy Markdown
Member Author

Merging this for now (need to test something on louhi/run this incase no issues).
Need to investigate the linux failing test. Can trigger the flow 1 again if there are any concerning issues.

@PranjalC100 PranjalC100 merged commit 9a59265 into v3.8.2_release Apr 29, 2026
18 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

execute-integration-tests Run only integration tests execute-integration-tests-on-zb To run E2E tests on zonal bucket.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants