Repeatable cleanup got introduced with FLIP-194 but should be considered as an independent feature of the JobResultStore (JRS) from a user's point of view.
Repeatable cleanup can be triggered by running into an error while cleaning up. This can be achieved by disabling access to S3 after the job finished, e.g.:
- Setting a reasonable enough checkpointing time (checkpointing should be enabled to allow cleanup of s3)
- Disable s3 (removing permissions or shutting down the s3 server)
- Stop job with savepoint
Stopping the job should work but the logs should show failure with repeating retries. Enabling S3 again should fix the issue.
Keep in mind that if testing this in with HA, you should use a different bucket for the file-based JRS artifacts only change permissions for the bucket that holds JRS-unrelated artifacts. Flink would fail fatally if the JRS is not able to access it's backend storage.