lukasz-antoniak commented on code in PR #2036:
URL: 
https://github.com/apache/cassandra-java-driver/pull/2036#discussion_r2043882546


##########
core/src/main/java/com/datastax/oss/driver/internal/core/context/StartupOptionsBuilder.java:
##########
@@ -142,4 +151,14 @@ protected String getDriverName() {
   protected String getDriverVersion() {
     return Session.OSS_DRIVER_COORDINATES.getVersion().toString();
   }
+
+  private String localDc(DriverExecutionProfile profile) {
+    String dc = context.getLocalDatacenter(profile.getName()); // DC set 
programmatically
+    if (dc == null && 
profile.isDefined(DefaultDriverOption.LOAD_BALANCING_LOCAL_DATACENTER)) {
+      dc =
+          profile.getString(
+              DefaultDriverOption.LOAD_BALANCING_LOCAL_DATACENTER); // DC from 
configuration
+    }
+    return dc;
+  }

Review Comment:
   I have noticed that and though that other entries of the STARTUP options are 
added 
[here](https://github.com/apache/cassandra-java-driver/blob/4.19.0/core/src/main/java/com/datastax/oss/driver/internal/core/context/StartupOptionsBuilder.java#L99-L103).
 The justification of the logic would be that all "dedicated" properties for 
STARTUP message are lazily instantiated where you pointed out, whereas all 
properties taken from other components (e.g. compression) are automatically 
injected in `build()` method.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to