SiyaoIsHiding commented on PR #462: URL: https://github.com/apache/cassandra-nodejs-driver/pull/462#issuecomment-4558520658
Bret points out that the Java driver's behavior is that every time a new control connection is established, it refreshes schema https://github.com/apache/cassandra-java-driver/blob/90b09e0e34fd6fdda064f13f6acd0df7268a3dc6/core/src/main/java/com/datastax/oss/driver/internal/core/control/ControlConnection.java#L460-L469 It makes sense to me that Node.js driver can align with Java driver's behavior. That would be an easier fix, too. ``` diff --git a/lib/control-connection.js b/lib/control-connection.js index 5abf8b06..4199281c 100644 --- a/lib/control-connection.js +++ b/lib/control-connection.js @@ -415,6 +415,8 @@ class ControlConnection extends events.EventEmitter { await this.metadata.refreshKeyspacesInternal(false); this.metadata.initialized = true; + } else if (this.options.isMetadataSyncEnabled) { + await this.metadata.refreshKeyspacesInternal(false); } } ``` -- 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]
