Skip to content

feat(pirlo): add enable-rapid-writes and optimize finalize-file-on-close for pirlo#4668

Open
vipnydav wants to merge 2 commits intomasterfrom
pirlo-flag-changes
Open

feat(pirlo): add enable-rapid-writes and optimize finalize-file-on-close for pirlo#4668
vipnydav wants to merge 2 commits intomasterfrom
pirlo-flag-changes

Conversation

@vipnydav
Copy link
Copy Markdown
Member

@vipnydav vipnydav commented May 5, 2026

Description

This PR introduces the enable-rapid-writes flag and refactors the file finalization logic to support optimizations for Pirlo buckets.

Key Changes

  • Added enable-rapid-writes flag: This new flag allows users to toggle between the STANDARD and RAPID storage classes when writing to Pirlo buckets.
  • Renamed and Optimized finalize-file-on-close: The finalize-file-for-rapid flag has been renamed to finalize-file-on-close. Additionally, bucket-type optimizations have been added, it now defaults to true for pirlo buckets and false for zonal buckets when not explicitly set.
  • Architectural Refactor for Optimization: The finalize-file-on-close parameter was removed from the BucketHandle function signature. Instead, it is now retrieved directly from the WriteConfig within the StorageClientConfig. This ensures that the correctly optimized value (determined during configuration binding) is used by the bucket handle rather than a stale or unoptimized parameter.

Link to the issue in case of a bug fix.

b/498246786

Testing details

  1. Manual - Done
  2. Unit tests - NA
  3. Integration tests - Automated

Any backward incompatible change? If so, please explain.

@vipnydav vipnydav requested a review from a team as a code owner May 5, 2026 04:12
@vipnydav vipnydav requested a review from abhishek10004 May 5, 2026 04:12
@vipnydav vipnydav added the execute-integration-tests Run only integration tests label May 5, 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 introduces optimizations for Pirlo buckets by adding a new configuration flag for rapid writes and refactoring the file finalization logic. By centralizing the finalization configuration within the storage client's write configuration, the system ensures that bucket-specific optimizations are applied correctly during configuration binding, improving both performance and maintainability.

Highlights

  • New Configuration Flag: Added the enable-rapid-writes flag to toggle between STANDARD and RAPID storage classes for Pirlo buckets.
  • Refactored File Finalization: Renamed finalize-file-for-rapid to finalize-file-on-close and updated its logic to support bucket-type optimizations, defaulting to true for Pirlo buckets and false for Zonal buckets.
  • Architectural Improvement: Removed finalize-file-on-close from the BucketHandle signature, moving it to WriteConfig within StorageClientConfig to ensure consistent configuration usage.
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.

@github-actions github-actions Bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label May 5, 2026
@vipnydav vipnydav added execute-integration-tests-on-zb To run E2E tests on zonal bucket. and removed remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. labels May 5, 2026
Copy link
Copy Markdown
Contributor

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

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 introduces the enable-rapid-writes configuration and renames finalize-file-for-rapid to finalize-file-on-close, centralizing these settings within the WriteConfig struct and implementing optimization rules for zonal and pirlo buckets. Review feedback highlights the need to restrict the EnableRapidWrites flag specifically to Pirlo buckets and to include nil checks for bh.writeConfig to avoid potential runtime panics.

Comment thread internal/storage/bucket_handle.go Outdated
Comment thread internal/storage/bucket_handle.go Outdated
@vipnydav vipnydav requested a review from meet2mky as a code owner May 5, 2026 04:44
@vipnydav vipnydav force-pushed the pirlo-flag-changes branch from b7cc583 to 8e4246d Compare May 5, 2026 04:54
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.76%. Comparing base (30a63b9) to head (8e4246d).

Files with missing lines Patch % Lines
internal/fs/fs.go 0.00% 1 Missing ⚠️
internal/storage/bucket_handle.go 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4668      +/-   ##
==========================================
+ Coverage   83.72%   83.76%   +0.03%     
==========================================
  Files         165      165              
  Lines       20490    20491       +1     
==========================================
+ Hits        17156    17165       +9     
+ Misses       2695     2689       -6     
+ Partials      639      637       -2     
Flag Coverage Δ
unittests 83.76% <88.23%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vipnydav vipnydav requested a review from anushka567 May 5, 2026 14:28
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.

1 participant