scm-cache: failure to delete underlying cache entry file (e.g., due to OS level error) needs to be cleaned up better

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 4.8.0
    • Affects Version/s: None
    • Component/s: Enterprise, SCM Cache
    • None

      When SCM Cache entries expire or are evicted, the underlying cache entry file is deleted from disk. Currently, if the file deletion fails (e.g., because another process is locking the file), we fall back on deleteOnExit() to clean up the file when the JVM terminates. If file deletion failure is frequent and the JVM remains up for a very long time, this could lead to very many large files stuck in the $BITBUCKET_HOME/caches/scm directory, possibly contributing to running out of disk space which would require a restart to resolve.

      If file deletion consistently fails due to some underlying OS problem, there's not much that can be done to free up more space. But if the file deletion failure is due to an intermittent problem and may succeed if retried, Bitbucket Server should retry periodically rather than falling back on deleteOnExit(). Either way, it should also log more information in the atlassian-bitbucket.log file to allow customers and Support to diagnose the problem more easily.

            Assignee:
            Cristan Szmajda (Inactive)
            Reporter:
            Cristan Szmajda (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: