Skip to content

Skip scanning internal index options from information schema#3767

Open
jason424217 wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
jason424217:ziyue-dev
Open

Skip scanning internal index options from information schema#3767
jason424217 wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
jason424217:ziyue-dev

Conversation

@jason424217
Copy link
Copy Markdown

Fix a production issue b/508672290 where Import/Export does not work with vector index now. Successfully export and import to https://pantheon.corp.google.com/spanner/instances/test-instance-nehadjoshi-prod/databases/ziyue-ann-gsql-imported/details/query?project=span-cloud-testing&chat= for gsql and https://pantheon.corp.google.com/spanner/instances/test-instance-nehadjoshi-prod/databases/ziyue-ann-pg-all/details/query?project=span-cloud-testing for pg that shows vector index with internal information schema indexes options.

@jason424217 jason424217 requested a review from a team as a code owner May 7, 2026 01:26
@gemini-code-assist
Copy link
Copy Markdown

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 a production issue where Import/Export operations failed when encountering vector indexes. By filtering out specific internal system index options from the information schema, the scanner can now successfully process these indexes without conflict.

Highlights

  • Filtered internal index options: Updated the InformationSchemaScanner to ignore index options starting with 'internal_updated_' or 'system_optimized_' to prevent import/export failures with vector indexes.
  • Enhanced test coverage: Added comprehensive unit tests for listIndexOptions to verify that internal options are correctly filtered out during the scanning process.
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.

Copy link
Copy Markdown

@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 updates the InformationSchemaScanner to filter out internal and system-optimized index options and introduces unit tests for this logic. Feedback highlights a bug where index names are not correctly qualified for GoogleSQL, which could lead to missing options for indexes in named schemas. It is also recommended to remove unused parameters and variables and to expand the test coverage to include named schemas.

@jason424217 jason424217 force-pushed the ziyue-dev branch 2 times, most recently from 7dd527f to 92737e1 Compare May 7, 2026 01:43
@pull-request-size pull-request-size Bot added size/L and removed size/M labels May 7, 2026
@pull-request-size pull-request-size Bot added size/M and removed size/L labels May 7, 2026
@rohitwali rohitwali requested a review from darshan-sj May 8, 2026 04:16
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.16%. Comparing base (1826073) to head (18f528e).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3767      +/-   ##
============================================
- Coverage     53.17%   53.16%   -0.01%     
+ Complexity     6499     6087     -412     
============================================
  Files          1075     1075              
  Lines         65263    65263              
  Branches       7239     7239              
============================================
- Hits          34701    34697       -4     
- Misses        28234    28238       +4     
  Partials       2328     2328              
Components Coverage Δ
spanner-templates 72.83% <ø> (+<0.01%) ⬆️
spanner-import-export 68.65% <ø> (+0.01%) ⬆️
spanner-live-forward-migration 80.94% <ø> (ø)
spanner-live-reverse-replication 77.06% <ø> (ø)
spanner-bulk-migration 91.11% <ø> (ø)
gcs-spanner-dv 85.76% <ø> (ø)
see 3 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.

@jason424217
Copy link
Copy Markdown
Author

Please add the #bug-fix label to this PR so the checks can pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant