@NY
There are several bugs related content repository failing to clean-up under specific conditions.
Based on your description and version of HDF, the most likely bugs are the following:
https://issues.apache.org/jira/browse/NIFI-6846
https://issues.apache.org/jira/browse/NIFI-5771
Both of the above would result in cleanup occurring only on NiFi Restart once the condition occurs.
If you are using the VolatileFlowFileRepository implementation which is uncommon, you may be hitting:
https://issues.apache.org/jira/browse/NIFI-6236
While you are not hitting below jira because it was only introduced in Apache NIFi 1.9.1 (HDF3.4.0 - removed) and fixed in HDF 3.4.1, sharing for completeness here:
https://issues.apache.org/jira/browse/NIFI-6150
All the above are addressed, except NIFI-6846 are addressed in HDF 3.4.1 (Apache NiFi 1.9.2).
All above are fixed in HDF 3.5.1 (Apache NiFi 1.11.4).
I recommend upgrading to HDF 3.5.x (latest)
Hope this helps,
Matt