sborya commented on a change in pull request #1437:
URL: https://github.com/apache/samza/pull/1437#discussion_r520889344



##########
File path: 
samza-core/src/main/java/org/apache/samza/coordinator/metadatastore/CoordinatorStreamStore.java
##########
@@ -188,6 +188,14 @@ public void flush() {
     }
   }
 
+  @Override
+  protected void finalize() throws Throwable {

Review comment:
       I don't think using finalize is a good idea.
   This will cause unpredictable performance impact, since each garbage 
collection may take an arbitrary time now.
   The services should be stopped as a part of stopped flow, not on garbage 
collection.

##########
File path: 
samza-core/src/main/java/org/apache/samza/coordinator/metadatastore/CoordinatorStreamStore.java
##########
@@ -188,6 +188,14 @@ public void flush() {
     }
   }
 
+  @Override

Review comment:
       
    preferred way of calling super.finalize should be:
   finalize() {
     try {
      .. stop...
   } finally {
     super.finalize();
   }
   }




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to