Skip to content

Improve serializable diag logs#4591

Open
lukaszrzasik wants to merge 3 commits into
mainfrom
lr/fix-function-name
Open

Improve serializable diag logs#4591
lukaszrzasik wants to merge 3 commits into
mainfrom
lr/fix-function-name

Conversation

@lukaszrzasik

Copy link
Copy Markdown
Contributor

Closes #<ISSUE_NUMBER>

This PR:

  • resolves real fn name in async serializable_retry logs
  • only log own-role sessions in serialization diag

This PR does not:

Key places to review:

@gemini-code-assist

Copy link
Copy Markdown
Contributor
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.

@claude

claude Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Claude finished @lukaszrzasik's task in 1m 30s —— View job


Code Review

  • Gather context and read changed files
  • Check existing review comments
  • Review code quality, security, performance
  • Post review feedback

This is a clean, well-scoped PR with two targeted fixes. Both changes are correct and the new tests are thorough.

function_name! macro fix (storage.rs)

The change from .next() to .find(|segment| *segment != "{{closure}}") correctly handles async contexts where Rust's type_name includes one or more {{closure}} segments in the path. The fix is minimal and correct — rsplit already iterates from the end, so find simply skips past any trailing {{closure}} segments to reach the real function name.

The new tests cover the three important async scenarios: plain async fn, nested closures + async blocks (matching real serializable_retry! call sites), and #[async_trait] methods. Good coverage.

pg_stat_activity query filter (sql.rs)

Adding AND usename = current_user is a sensible noise-reduction filter — in shared Postgres instances, other applications' sessions are irrelevant to diagnosing serialization conflicts.

One observation: The second diagnostic query (lines 869–874) that logs SIReadLock predicate locks also joins pg_stat_activity but does not include the usename = current_user filter. If the rationale for filtering the first query is to reduce noise from unrelated sessions, the same reasoning likely applies to the lock query. Consider adding AND a.usename = current_user there as well for consistency.

Summary

LGTM — both fixes are correct. The only suggestion is the optional consistency improvement for the second diagnostic query noted above.

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