Skip to content

Conversation

@scotthart
Copy link
Member

@scotthart scotthart commented Feb 6, 2026

This change is Reviewable

@scotthart scotthart requested a review from a team as a code owner February 6, 2026 14:51
@gemini-code-assist
Copy link

Summary of Changes

Hello @scotthart, 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 enhances the Bigtable example snippets by adopting C++ best practices for function parameter passing. The change specifically modifies BigtableTableAdminClient parameters to use constant references, which improves code efficiency by eliminating unnecessary object copies and clearly signals that the client object remains unmodified within the scope of the function or lambda.

Highlights

  • Parameter Type Update: The BigtableTableAdminClient parameters in the WaitForConsistencyCheck function and an associated lambda have been updated to be passed by const& (constant reference) instead of by value.
Changelog
  • google/cloud/bigtable/examples/table_admin_snippets.cc
    • Updated BigtableTableAdminClient parameters in WaitForConsistencyCheck and a lambda to const&.
Activity
  • No activity has been recorded for this pull request yet.
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.

Copy link

@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 applies clang-tidy fixes to pass a BigtableTableAdminClient by const& instead of by value. While this avoids a copy, I've pointed out a more significant performance issue where the passed-in client is ignored and a new one is created, leading to unnecessary new connections. I've suggested a refactoring to use the passed-in client, which would be more efficient.

using ::google::cloud::Status;
using ::google::cloud::StatusOr;
[](cbta::BigtableTableAdminClient, std::string const& project_id,
[](cbta::BigtableTableAdminClient const&, std::string const& project_id,

Choose a reason for hiding this comment

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

medium

The passed-in client is ignored here, and a new one is created on line 636. This is inefficient as it requires establishing a new connection. It would be better to use the passed-in client.

To fix this, WaitForConsistencyCheck should take its admin parameter by value (reverting the change on line 625). Then, this lambda could also take admin by value, and use it instead of creating a new client. This would make the code more efficient and consistent with other snippets in this file.

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.80%. Comparing base (56d7714) to head (2adc396).
⚠️ Report is 2 commits behind head on prepare-for-v3.0.0.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           prepare-for-v3.0.0   #15940   +/-   ##
===================================================
  Coverage               92.79%   92.80%           
===================================================
  Files                    2332     2332           
  Lines                  214327   214327           
===================================================
+ Hits                   198895   198909   +14     
+ Misses                  15432    15418   -14     

☔ 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.

@scotthart scotthart enabled auto-merge (squash) February 6, 2026 15:25
Copy link
Collaborator

@diegomarquezp diegomarquezp left a comment

Choose a reason for hiding this comment

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

@diegomarquezp reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @diegomarquezp and @scotthart).

@scotthart scotthart merged commit 3cf9e93 into googleapis:prepare-for-v3.0.0 Feb 6, 2026
56 of 65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants