fix: add patch to prevent db purge race condition
Backport a patch to prevent a possible race-condition, as described in the upstream bug:
Edited by Robert Franzke
Backport a patch to prevent a possible race-condition, as described in the upstream bug: