You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/04/02 17:17:04 UTC

[GitHub] [pulsar] jerrypeng opened a new pull request #3969: Cleanup temporary files created by functions

jerrypeng opened a new pull request #3969: Cleanup temporary files created by functions
URL: https://github.com/apache/pulsar/pull/3969
 
 
   
   
   ### Motivation
   
   Currently, in functions internal code, temporary files are created for purposes of downloading function packages locally.  These files care never cleaned up and may linger around for a long time.  In the best case, this will only cause storage to be unnecessarily wasted but in the worst case this can cause memory issues (which usually is going to be a lot smaller than storage) especially for brokers/workers running in containers since the whole filesystem is just in memory. 
   
   ### Modifications
   
   Clean up the temporary files that are created.  To do this I also need to do the following:
   
   1. Refactor the code because the temporary file creation was deeply embedded and sprinkled in random places
   
   2. Because I need to refactor the code, I also needed separate out the code for V3 endpoints and the code for V2 endpoints as all that logic is currently mushed together and extremely convoluted.
   
   3. Fix all the tests because of the refactoring
   
   4. After the refactoring, the temporary files can be referenced thus deleted.
   
   5. Added tests to test temp file cleanup
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services