feat(bigtable): enable bigtable conn pool by default#14319
Open
sushanb wants to merge 1 commit intogoogleapis:mainfrom
Open
feat(bigtable): enable bigtable conn pool by default#14319sushanb wants to merge 1 commit intogoogleapis:mainfrom
sushanb wants to merge 1 commit intogoogleapis:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the EnableBigtableConnectionPool function to enable the connection pool by default if the environment variable is unset or invalid. The feedback recommends clarifying the code comments to explicitly state the fallback behavior when environment variable parsing fails.
Comment on lines
+202
to
+203
| // just fail and use bigtable conn pool | ||
| return true |
Contributor
There was a problem hiding this comment.
The comment 'just fail' is ambiguous. When implementing logic that parses strings, include clear error handling for parsing failures. It is clearer to state that the code is falling back to the default behavior when parsing fails.
Suggested change
| // just fail and use bigtable conn pool | |
| return true | |
| // If the environment variable value is invalid, default to enabling the pool. | |
| return true |
References
- When implementing helper functions that parse strings, always use the provided string parameter and include error handling for parsing failures. For test helpers, panic can be used for unrecoverable parsing errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Can be disabled via CBT_BIGTABLE_CONN_POOL=false.