Skip to content

Conversation

@aasthabharill
Copy link
Member

@aasthabharill aasthabharill commented Dec 19, 2025

@gemini-code-assist
Copy link

Summary of Changes

Hello @aasthabharill, 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 resolves a persistent flakiness issue in a critical Spanner to MySQL replication test by refining the core logic for processing and comparing record sequences. The changes enhance the robustness of the data pipeline by accurately identifying record states and introducing explicit logging for duplicate entries, which is crucial for maintaining data integrity and debugging in high-throughput, custom transformation environments.

Highlights

  • Flaky Test Fix: This pull request addresses and fixes a flakiness issue identified in the SpannerToMySqlCustomTransformationLT.reverseReplication1KTpsWithCustomTransformation test.
  • Record Sequence Comparison Logic: The comparison logic for record sequence numbers within SourceWriterFn.java has been updated from a strict greater than (>) to a greater than or equal to (>=) when determining if a shadow table record is considered 'ahead' of a Spanner record. This change ensures more accurate handling of record ordering and potential re-processing scenarios.
  • Duplicate Record Detection and Logging: New logging has been introduced in SourceWriterFn.java to explicitly detect and report duplicate records. If a shadow table record and a Spanner record share the exact same processed commit timestamp and record sequence, a log message will now indicate that a duplicate record has been found.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 36.36364% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.70%. Comparing base (08838cc) to head (684b7d9).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...leport/v2/templates/transforms/SourceWriterFn.java 36.36% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3134      +/-   ##
============================================
+ Coverage     50.66%   50.70%   +0.03%     
- Complexity     5051     5072      +21     
============================================
  Files           974      974              
  Lines         59828    59882      +54     
  Branches       6527     6539      +12     
============================================
+ Hits          30314    30363      +49     
- Misses        27370    27375       +5     
  Partials       2144     2144              
Components Coverage Δ
spanner-templates 70.83% <36.36%> (+0.03%) ⬆️
spanner-import-export 68.97% <ø> (ø)
spanner-live-forward-migration 80.06% <ø> (+0.01%) ⬆️
spanner-live-reverse-replication 77.64% <36.36%> (-0.09%) ⬇️
spanner-bulk-migration 88.35% <ø> (+0.06%) ⬆️
Files with missing lines Coverage Δ
...leport/v2/templates/transforms/SourceWriterFn.java 81.76% <36.36%> (-2.81%) ⬇️

... and 12 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.

@aasthabharill aasthabharill changed the title Fix flaky SpannerToMySqlCustomTransformationLT.reverseReplication1KTpsWithCustomTransformation Investigate counters in reverse replication job Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant