Skip to content

Conversation

@surbhigarg92
Copy link
Contributor

This PR changes the logic to check if RPC has used DirectPath or not. Noe Alts Information will be used to check if DP is used instead of relying on IP address range

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/java-spanner API. labels Nov 14, 2025
@surbhigarg92 surbhigarg92 marked this pull request as ready for review November 14, 2025 10:39
@surbhigarg92 surbhigarg92 requested review from a team as code owners November 14, 2025 10:39
@surbhigarg92 surbhigarg92 added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 14, 2025
@rahul2393
Copy link
Contributor

/gemini review

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 refactors the logic for detecting DirectPath usage. Instead of checking the remote IP address, it now uses AltsContextUtil.check(), which inspects the ALTS context of the RPC. This is a good improvement as it's more robust and less brittle than relying on specific IP address prefixes. The changes are clean, and the removal of the now-unused isDirectPathUsed method and its related imports simplifies the code. Overall, this is a solid enhancement.

@surbhigarg92 surbhigarg92 removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 17, 2025
@surbhigarg92 surbhigarg92 merged commit ab7e2e0 into main Nov 17, 2025
41 of 43 checks passed
@surbhigarg92 surbhigarg92 deleted the directpath_used_attr branch November 17, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/java-spanner API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants