PIM-3325 : attempt to move flush logic in persister