absurdfarce commented on PR #2036: URL: https://github.com/apache/cassandra-java-driver/pull/2036#issuecomment-3192790679
So, I think this addresses the serialization changes referenced above. But we are seeing a host of [IT failures](https://ci-cassandra.apache.org/job/cassandra-java-driver/job/PR-2036/8/testReport/junit/com.datastax.oss.driver.core/AllNodesFailedIT/Matrix___Matrix___TEST_JAVA_VERSION____openjdk_1_8_0_292___SERVER_VERSION____4_0____Tests___should_report_multiple_errors_per_node/) with errors similar to the following: ``` Expected size: 2 but was: 1 in: [com.datastax.oss.driver.api.core.connection.ConnectionInitException: [s10|control|id: 0xc1585e83, L:/127.0.0.1:33080 - R:/127.0.0.14:9043] Protocol initialization request, step 2 (OPTIONS): unexpected exception (java.lang.NullPointerException: null value in entry: localDc=null) at com.datastax.oss.driver.internal.core.channel.ProtocolInitHandler$InitRequest.fail(ProtocolInitHandler.java:358) at com.datastax.oss.driver.internal.core.channel.ProtocolInitHandler$InitRequest.onResponse(ProtocolInitHandler.java:351) at com.datastax.oss.driver.internal.core.channel.ChannelHandlerRequest.onResponse(ChannelHandlerRequest.java:96) ...(22 remaining lines not displayed - this can be changed with Assertions.setMaxStackTraceElementsDisplayed)] ``` Underlying problem here seems to be a variation on something we discussed earlier; some startup options aren't available at context creation time (when StartupOptionsBuilder is created). Let's focus specifically on local DC; it's computed [based on the nodes in the cluster](https://github.com/apache/cassandra-java-driver/blob/4.19.0/core/src/main/java/com/datastax/oss/driver/internal/core/loadbalancing/BasicLoadBalancingPolicy.java#L188-L213) and is computed [when the LBP is initialized](https://github.com/apache/cassandra-java-driver/blob/4.19.0/core/src/main/java/com/datastax/oss/driver/internal/core/loadbalancing/BasicLoadBalancingPolicy.java#L170). But that doesn't happen [until we create the connection pool](https://github.com/apache/cassandra-java-driver/blob/4.19.0/core/src/main/java/com/datastax/oss/driver/internal/core/session/DefaultSession.java#L472-L481) which makes sense (given that we don't have full info about available nodes until much beyond that point). Upshot is I don't think we can handle local DC in StartupOptionsBuilder... it's gonna have to be computed elsewhere and added to the STARTUP message at generation time. -- 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