rajucomp commented on code in PR #1766:
URL: https://github.com/apache/stormcrawler/pull/1766#discussion_r2669714567


##########
external/sql/src/main/java/org/apache/stormcrawler/sql/StatusUpdaterBolt.java:
##########
@@ -253,17 +286,27 @@ private synchronized void checkExecuteBatch() throws 
SQLException {
         lastInsertBatchTime = System.currentTimeMillis();
         currentBatchSize = 0;
         waitingAck.clear();
-
-        insertPreparedStmt.close();
-        insertPreparedStmt = connection.prepareStatement(insertQuery);
     }
 
     @Override
     public void cleanup() {

Review Comment:
   I was thinking about this. We should look into making these interfaces 
extend `AutoCloseable` for better resources cleanup. This would also help to 
use these components with `try-with-resources` block. 
https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html. 
   Would like to hear your thoughts on this.



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

Reply via email to