FEAT: rewire bigtable.internal.sessions-required system property - #14078
FEAT: rewire bigtable.internal.sessions-required system property#14078neilw4 wants to merge 1 commit into
Conversation
…sed internally for testing.
There was a problem hiding this comment.
Code Review
This pull request introduces support for the "bigtable.internal.sessions-required" system property in ClientConfigurationManager.java. When enabled, it sets a default session load of 1.0f if the configured session load is zero, and ensures areSessionsRequired() returns true. The feedback suggests defining a constant for the duplicated system property key to improve maintainability.
| if (builder.getSessionConfiguration().getSessionLoad() == 0) { | ||
| builder.clearSessionConfiguration(); | ||
| return builder.build(); | ||
| if (Boolean.getBoolean("bigtable.internal.sessions-required")) { |
There was a problem hiding this comment.
The system property key "bigtable.internal.sessions-required" is duplicated here and on line 425. Consider defining a constant for the property name to improve maintainability. Note that caching system properties or environment variables in class fields is unnecessary if they are only evaluated once during object initialization.
References
- Avoid caching system properties or environment variables in class fields if they are only evaluated once during object initialization, as caching is unnecessary in such cases.
This is used internally for testing