Skip to content

fix(bigtable): Log warning on background task failure instead of exception - #18193

Draft
daniel-sanche wants to merge 4 commits into
googleapis:mainfrom
daniel-sanche:fix_bigtable_sync_thread_error
Draft

fix(bigtable): Log warning on background task failure instead of exception#18193
daniel-sanche wants to merge 4 commits into
googleapis:mainfrom
daniel-sanche:fix_bigtable_sync_thread_error

Conversation

@daniel-sanche

Copy link
Copy Markdown
Contributor

Bigtable data clients use background threads/coroutines to keep grpc channels warmed, and refresh them before expiration. These background tasks can fail due to resource exhaustion, or other issues.

This PR will log a warning and continue if there is an error during task set up, instead of rasing an exception

Also improves exception capture, which would sometimes state misleading information about the cause of the error.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 Bigtable client and query iterator to gracefully handle task creation failures during background channel refresh and instance registration by catching exceptions, logging warnings, and proceeding with the tasks disabled. The review feedback highlights that the newly added fallback unit tests should be updated to explicitly assert the expected call sequence and arguments of the mocked create_task helper, ensuring compliance with the repository's style guide on mock hygiene.

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.

1 participant