Skip to content

[Cloud_Spanner_to_Avro] Use FileIO EvictWritersWhenFull feature in Spanner to Avro export template - #4395

Merged
darshan-sj merged 3 commits into
GoogleCloudPlatform:mainfrom
darshan-sj:spill-to-shuffle-fix
Oct 27, 2026
Merged

darshan-sj merged 3 commits into
GoogleCloudPlatform:mainfrom
darshan-sj:spill-to-shuffle-fix

Conversation

@darshan-sj

@darshan-sj darshan-sj commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

[Cloud_Spanner_to_Avro] Use FileIO EvictWritersWhenFull feature in Spanner to Avro export template

@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 updates the project's Apache Beam dependencies and optimizes the Spanner export process by configuring writer eviction policies. These changes aim to enhance memory efficiency and stability during large-scale data exports.

Highlights

  • Dependency Update: Updated Apache Beam SDK dependencies to version 2.77.0-SNAPSHOT in the project configuration.
  • Writer Configuration: Enabled EvictWritersWhenFull and set the maximum number of writers per bundle to 2 in the ExportTransform to improve resource management.
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 the 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 counterproductive. 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. ↩

@darshan-sj darshan-sj added the improvement Making existing code better label Oct 8, 2026
@darshan-sj darshan-sj changed the title Using EvictWritersWhenFull [DO NOT MERGE] Using EvictWritersWhenFull Oct 8, 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 adds hardcoded snapshot versions for Apache Beam dependencies in v1/pom.xml and configures writer eviction and a maximum of two writers per bundle in ExportTransform.java. The review feedback advises against hardcoding snapshot versions as it bypasses dependency management and causes non-reproducible builds. Additionally, setting the maximum number of writers per bundle to two is flagged as a performance risk that could lead to severe writer thrashing and high overhead during database exports.

Comment thread v1/pom.xml
Comment thread v1/pom.xml
Comment thread v1/src/main/java/com/google/cloud/teleport/spanner/ExportTransform.java Outdated
@darshan-sj
darshan-sj force-pushed the spill-to-shuffle-fix branch 2 times, most recently from fb3b185 to 0e1ccb7 Compare October 20, 2026 06:59
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.83%. Comparing base (ab05391) to head (a0c971e).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##               main    #4395       +/-   ##
=============================================
+ Coverage     36.74%   56.83%   +20.09%     
- Complexity      749     7614     +6865     
=============================================
  Files           250     1164      +914     
  Lines         17325    74094    +56769     
  Branches       1805     8731     +6926     
=============================================
+ Hits           6366    42114    +35748     
- Misses        10436    29176    +18740     
- Partials        523     2804     +2281     
Components Coverage Δ
spanner-templates 83.69% <ø> (∅)
spanner-import-export 72.16% <100.00%> (∅)
spanner-live-forward-migration 86.91% <ø> (∅)
spanner-live-reverse-replication 79.19% <ø> (∅)
spanner-bulk-migration 87.87% <ø> (∅)
gcs-spanner-dv 85.70% <ø> (∅)
Files with missing lines Coverage Δ
...google/cloud/teleport/spanner/ExportTransform.java 53.23% <100.00%> (ø)

... and 940 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@darshan-sj
darshan-sj force-pushed the spill-to-shuffle-fix branch 2 times, most recently from a6a9647 to eca2d8e Compare October 24, 2026 17:30
@darshan-sj darshan-sj changed the title [DO NOT MERGE] Using EvictWritersWhenFull [Cloud_Spanner_to_Avro] Use FileIO EvictWritersWhenFull feature in Spanner to Avro export template Oct 24, 2026
@darshan-sj
darshan-sj force-pushed the spill-to-shuffle-fix branch from eca2d8e to 47a5647 Compare October 26, 2026 07:23

@bharadwaj-aditya bharadwaj-aditya 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.

LGTM

@bharadwaj-aditya bharadwaj-aditya 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.

LGTM

@darshan-sj
darshan-sj merged commit c19150a into GoogleCloudPlatform:main Oct 27, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Making existing code better size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants