rhtyd commented on a change in pull request #2224: CLOUDSTACK-10032 : Database 
entries for templates created from snapshots disappear after management-server 
service restart
URL: https://github.com/apache/cloudstack/pull/2224#discussion_r131460642
 
 

 ##########
 File path: 
services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
 ##########
 @@ -525,6 +525,8 @@ protected Answer 
copySnapshotToTemplateFromNfsToNfs(CopyCommand cmd, SnapshotObj
                     bufferWriter.write("\n");
                     long size = _storage.getSize(destFileFullPath);
                     bufferWriter.write("size=" + size);
+                    bufferWriter.close();
 
 Review comment:
   LGTM, however, should we consider a `try-with-resource` syntax that can 
handle proper cleanup of resources in case of errors and valid closures.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to