toptobes commented on code in PR #462:
URL: 
https://github.com/apache/cassandra-nodejs-driver/pull/462#discussion_r3376946878


##########
lib/control-connection.js:
##########
@@ -412,15 +408,13 @@ class ControlConnection extends events.EventEmitter {
       // To acquire metadata we need to specify the cassandra version
       this.metadata.setCassandraVersion(this.host.getCassandraVersion());
       this.metadata.buildTokens(this.hosts);
+    }
 
-      if (!this.options.isMetadataSyncEnabled) {
-        this.metadata.initialized = true;
-        return;
-      }
-
+    if (isReconnecting && this.options.isMetadataSyncEnabled) {
       await this.metadata.refreshKeyspacesInternal(false);
-      this.metadata.initialized = true;
     }
+
+    this.metadata.initialized = true;

Review Comment:
   I don't think it matters, no? As far as I can tell, it's idempotent (once 
set to true, it's never reset to false), no? I'm sure the user can spare an 
extra couple CPU cycles 🙂 



-- 
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