Skip to content

log all db error opertions that don't update any rows#3185

Merged
havetisyan merged 2 commits intomasterfrom
db-log
Jan 31, 2026
Merged

log all db error opertions that don't update any rows#3185
havetisyan merged 2 commits intomasterfrom
db-log

Conversation

@havetisyan
Copy link
Copy Markdown
Collaborator

@havetisyan havetisyan commented Jan 30, 2026

Description

Contribution Checklist:

  • The pull request does not introduce any breaking changes
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Attach Screenshots (Optional)

Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @havetisyan, 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 significantly improves the observability of database operations within the DBService class by introducing comprehensive error logging for various data manipulation failures. By adding specific LOG.error statements at points where database inserts, updates, or deletes might fail, the changes ensure that critical information about unsuccessful operations, including the affected entities and domains, is captured. This enhancement will make it easier to diagnose and troubleshoot issues related to data persistence and integrity.

Highlights

  • Enhanced Error Logging for Policy Operations: Added specific error logging for failed insertions and deletions of assertions and assertion conditions within policy processing, providing clearer insights into database failures.
  • Improved Logging for Role and Group Member Management: Introduced detailed error messages when inserting, deleting, or updating role and group members fails, including the member name, role/group, and domain for better context.
  • Comprehensive Logging for Service Identity Management: Implemented error logging for unsuccessful operations related to public key insertions, deletions, and updates, as well as service host insertions and deletions.
  • Detailed Logging for Domain Contact Management: Added error logging for failed insertions, deletions, and updates of domain contacts, specifying the contact type and name involved.
  • Logging for Domain Dependencies: Included error logging for failures during the insertion and deletion of domain dependencies.
  • Standardization of Error Messages: Updated several existing error log messages to consistently include the domain name, enhancing traceability and debugging capabilities.
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
Copy Markdown
Contributor

@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 introduces valuable error logging for database operations that fail to update any rows. This is a significant improvement for debugging and monitoring system health. The changes are well-implemented across various methods in DBService.java. I've provided several suggestions to further enhance the log messages by including more specific identifiers (like assertion IDs or public key IDs) where available. These additions will make troubleshooting even more efficient.

Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
@havetisyan havetisyan merged commit 9caa032 into master Jan 31, 2026
8 checks passed
@havetisyan havetisyan deleted the db-log branch January 31, 2026 17:20
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