Add tempFileCleanerTrigger configurations to be able to limit the job duration/quantity

Description

Acceptance Criteria

  1. As a System Engineer I want to be able to configure a maximum number of files that the TempFileCleaner can delete when it is triggered.

  2. As a System Engineer I want to be able to configure a maximum duration for the TempFileCleaner to run after it starts.

As a note, in case both of the above configurations are set, the cleaner will stop when exceeding the first condition. (e.g. if maxFiles = 1000 and maxTime=1000hours, the cleaner will most likely stop after 1000 files)

Technical details for #2:

  • Use the standard java.time.duration for the config to be consistent with the other jobs and parameters as found.

 

Side task

In some cases, the listFiles() method can return null causing the cleaner to fail with a NullPointerException.

This should be fixed to avoid such future errors.

See REPO-5381.

Activity

Show:
Steven Blair
February 18, 2021, 12:54 AM

I don't know the code as well as y’all do however when either the time or number of files is met, not and, we should stop the cleaner seems more prudent. we should discuss more on the call is setting up to review the Support feedback.

Lucian Tuca
February 18, 2021, 1:06 AM

, I totally agree. That’s what I’ve tried to suggest via the note in the description.

Assignee

Roxana Gherghelas

Reporter

Lucian Tuca

Labels

Release Train

None

Delivery Team

Team 7

Story Points

5

Components

Sprint

Team 7 - Iver 9

Fix versions

Priority

Unprioritized