You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "mattyb149 (via GitHub)" <gi...@apache.org> on 2023/05/03 13:41:06 UTC

[GitHub] [nifi] mattyb149 commented on a diff in pull request #7116: NIFI-11380: Refactor CaptureChangeMySQL with improvements

mattyb149 commented on code in PR #7116:
URL: https://github.com/apache/nifi/pull/7116#discussion_r1183705169


##########
nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java:
##########
@@ -839,19 +802,18 @@ protected void connect(List<InetSocketAddress> hosts, String username, String pa
         InetSocketAddress connectedHost = null;
         Exception lastConnectException = new Exception("Unknown connection error");
 
-        if (createEnrichmentConnection) {
-            try {
-                // Ensure driverLocation and driverName are correct before establishing binlog connection
-                // to avoid failing after binlog messages are received.
-                // Actual JDBC connection is created after binlog client gets started, because we need
-                // the connect-able host same as the binlog client.
-                registerDriver(driverLocation, driverName);
-            } catch (InitializationException e) {
-                throw new RuntimeException("Failed to register JDBC driver. Ensure MySQL Driver Location(s)" +
-                        " and MySQL Driver Class Name are configured correctly. " + e, e);
-            }
+        try {

Review Comment:
   We stopped using the DistributedMapCache and are always using an internal Map now, so we always create an enrichment connection, so we don't need to see if we need to.



-- 
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: issues-unsubscribe@nifi.apache.org

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