Reaper

The reaper is a tool in the storage component that is used to purge expired blobs.

The reaper carries out the purge processing at specified time intervals by polling for subfolders of the expiration folder in the storage bucket that are labeled with the current date. The reaper uses mementos, which are record files of time-stamped activity, to detect clock errors and prevent erroneous reaping.

System administrators configure the reaper tool with the storage -provision command.

Folders for the hours and dates before the current date and hour are deleted (or reaped), except when the memento mechanism prevents reaping. The value of the ReaperDelayTimeInMinutes parameter determines the time between the start of two consecutive reap activities. For example, if the delay is 20 minutes, the reaper runs one time every 20 minutes.

Reaper activity is not stopped by errors, collisions, corruption, or other anomalies that stop the process. The delay in minutes ensures that the reaper tries again if an anomaly occurs and reaps small units of data. The reaper reaps only 24 expired hours per cycle, so running one time per day does not allow backlog recovery. Reducing the delay time enables the system to deal with a potential backlog of expired days and to recover from anomalous events.

The reaper removes orphaned or corrupted data as part of the normal cleanup. If a reaper is running at the same time as another reaper, the process fails and warnings are written to the system log. The reaper tries one more time, and if it fails again, it stops and tries again at the next reap cycle. The reaper handles cleaning the following types of blobs:
  • Empty expired directories at any level
  • Invalid directories in the calendar tree
  • Orphaned and junk data
  • Other invalid data
Several reaping sessions might occur before damage or confusion is fixed, but eventually the reaper recovers from corruption or reaper conflict.
Restriction: Do not store any files manually in the storage folders. The reaper removes any files that are not recognized as valid storage data.

The reaper also relates to the automated process of saving blobs as files in a directory outside of AS4 Microservice. This divulging process occurs either when a blob is created or when a blob is purged. When you divulge when the blob is purged, the reaper controls when the divulging process occurs.

You can monitor the effectiveness of the reaper to see how many blobs are reaped and how many of those blobs are invalid files. For details about obtaining the files, see the logging documentation.

Table 1. Settings governing reaping
storage -provision Prompt Description
Enter base file path for this storage variant

The base file path that is reaped. Matches the base file path of the storage server.

(Requires -a option) Enter reaper memento day count (4)

The number of active days that mementos are kept. The value can be any integer up to a maximum of 3650 days (10 years). Minimum is one day, which disables the memento feature.

(Requires -a option) Enter reaper acceptable memento day range (7)

The range of days that the mementos must be within for reaping to occur. If the number of days exceeds this range, a clock error is suspected and no reaping occurs until the memento range is within the acceptable range.

Restriction: The reaper acceptable memento day range must be greater than or equal to the reaper memento day count minus one, or the reaper does not remove the expired folders.
(Requires -a option) Enter reaper time delay in minutes (60)

The delay time in minutes between the end of one reap cycle and the beginning of the next reap cycle.