absurdfarce commented on code in PR #2037:
URL: 
https://github.com/apache/cassandra-java-driver/pull/2037#discussion_r2361911916


##########
core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java:
##########
@@ -861,6 +874,12 @@ protected final CompletionStage<CqlSession> 
buildDefaultSessionAsync() {
       List<String> configContactPoints =
           defaultConfig.getStringList(DefaultDriverOption.CONTACT_POINTS, 
Collections.emptyList());
       if (cloudConfigInputStream != null) {
+        // override request id generator, unless user has already set it
+        if (programmaticArguments.getRequestIdGenerator() == null) {
+          programmaticArgumentsBuilder.withRequestIdGenerator(new 
W3CContextRequestIdGenerator());
+          LOG.debug(
+              "A secure connect bundle is provided, using 
W3CContextRequestIdGenerator as request ID generator.");

Review Comment:
   Agreed we should update to match the requirement for the Astra case 
@SiyaoIsHiding but I don't think we need to change the default in 
RequestIdGenerator.  We should be able to address that by updating 
W3CContextRequestIdGenerator constructors:
   
   new W3CContextRequestIdGenerator() == use the default key
   new W3CContextRequestIdGenerator(String key) == use the provided key
   
   Here we're in the Astra case so we'd clearly want to provide an arg.
   
   Remember, W3CContextRequestidGenerator != AstraRequestIdGenerator.  Just 
because the Astra requirements change doesn't mean we change the defaults.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to