[ 
https://issues.apache.org/jira/browse/GEODE-8929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17282019#comment-17282019
 ] 

ASF GitHub Bot commented on GEODE-8929:
---------------------------------------

pdxcodemonkey opened a new pull request #743:
URL: https://github.com/apache/geode-native/pull/743


   logger wasn't calculating size of existing logs at initialization, so 
stopping and restarting an app without deleting logs would cause the logger to 
'grow' used disk space by up to `log-disk-space-limit` each iteration.
   
   Also added appropriate tests, and fixed a default filename issue.
   
   Co-authored-by: Matthew Reddington <[email protected]>
   
   @mreddington @dihardman @davebarnes97 @karensmolermiller 


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


> Existing log files not counted in disk space calculations
> ---------------------------------------------------------
>
>                 Key: GEODE-8929
>                 URL: https://issues.apache.org/jira/browse/GEODE-8929
>             Project: Geode
>          Issue Type: Bug
>          Components: native client
>            Reporter: Blake Bender
>            Priority: Major
>
> When the native logger starts up, it looks for existing "rolled" log files, 
> i.e. files which were written by a previous instance of the client.  If it 
> finds any, they are added to an internal map, and when the current log file 
> would exceed the file size limit, the oldest existing rolled log file is 
> deleted, and a new one written.  The size of the existing files, however, is 
> not calculated and subtracted from available size at startup, so each 
> concurrent instance of the client can _add_ up to whatever is specified for 
> `log-disk-space-limit`.  So, for instance, if you set a disk space limit of 
> 5MB, run your app, generate 5MB of logs, and quit, you have 5MB of logs.  If 
> you run your app again, generate 5MB of logs, and quit, you now have 10MB of 
> logs, etc., effectively "leaking" disk space.
>  
> The workaround for now is to always delete existing log files at app startup, 
> but we should really either delete these when initializing the logger, or 
> calculate the existing used disk space at startup.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to