Reviewed: https://review.opendev.org/c/openstack/nova/+/887979 Committed: https://opendev.org/openstack/nova/commit/75e4c86d90ae0229069fc2eb06bfb41436be7319 Submitter: "Zuul (22348)" Branch: stable/2023.1
commit 75e4c86d90ae0229069fc2eb06bfb41436be7319 Author: melanie witt <[email protected]> Date: Wed Feb 22 23:58:33 2023 +0000 database: Archive parent and child rows "trees" one at a time Previously, we archived deleted rows in batches of max_rows parents + their child rows in a single database transaction. Doing it that way limited how high a value of max_rows could be specified by the caller because of the size of the database transaction it could generate. For example, in a large scale deployment with hundreds of thousands of deleted rows and constant server creation and deletion activity, a value of max_rows=1000 might exceed the database's configured maximum packet size or timeout due to a database deadlock, forcing the operator to use a much lower max_rows value like 100 or 50. And when the operator has e.g. 500,000 deleted instances rows (and millions of deleted rows total) they are trying to archive, being forced to use a max_rows value several orders of magnitude lower than the number of rows they need to archive was a poor user experience. This changes the logic to archive one parent row and its foreign key related child rows one at a time in a single database transaction while limiting the total number of rows per table as soon as it reaches >= max_rows. Doing this will allow operators to choose more predictable values for max_rows and get more progress per invocation of archive_deleted_rows. Closes-Bug: #2024258 Change-Id: I2209bf1b3320901cf603ec39163cf923b25b0359 (cherry picked from commit 697fa3c000696da559e52b664c04cbd8d261c037) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2024258 Title: Performance degradation archiving DB with large numbers of FK related records To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-archive/+bug/2024258/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
