Files
cinder/releasenotes/notes/bug-2111461-fix-db-purge-fails-due-to-foreign-key-constraint-errors-8a60db1f0158b36e.yaml
Fernando Ferraz 3370f90579 cinder-manage: Use same timestamp for purging deleted rows
The ``cinder-manage db purge <age_in_days>`` command currently
recalculates the timetamp for deleting rows for each table it
processes. This can lead to foreign key constraint errors, as
secondary (dependent) tables may be deleted before their
corresponding primary (parent) tables, each using slightly
different timestamps.

This patch addresses the issue by calculating the timestamp once
and reusing it across all bulk delete operations, ensuring that
all tables are purged relative to the same point in time.

Closes-Bug: #2111461
Change-Id: I2aa881936b85b3876d6c9c9cfe3b26932f65241a
2025-05-21 20:15:49 -03:00

10 lines
387 B
YAML

---
fixes:
- |
`Bug #2111461 <https://bugs.launchpad.net/cinder/+bug/2111461>`_: Fixed
issue preventing cinder-manage command to purge deleted rows due to
foreign key constraint errors. This happened as timestamp for bulk
delete operations were recalculated per table resulting in slighty
different intervals for deleting rows on primary and dependents
tables.