gerhard
(Gerhard Schlager)
14 يناير 2020، 2:09م
42
لقد قمت مؤخرًا بإجراء العديد من التحسينات على عملية الاستعادة، وهناك المزيد منها مخطط له. يحتوي طلب السحب (pull request) على وصف عالي المستوى للتغييرات.
master ← gschlager:backup_refactor
merged 10:41AM - 14 Jan 20 UTC
Lots of refactoring to make the code easier to test as well as fixing of bugs an… d doing some house cleaning.
The highlights are:
* `Restorer` has been split up into multiple classes to allow easier testing with as little stubbing as possible.
* All backups are directly restored into the `public` schema, because only very old database dumps can be restored into the `backup` schema. This simplifies that part of the restore process a lot.
* Restoring into PostgreSQL 11+ works.
* Better error handling and detection during the restore of the database dump.
* Restoring of backups from all major versions since v1.1 has been tested and various bugs for older versions have been fixed.
* The restore process really waits for Sidekiq to pause instead of just claiming that it does.
* Bugs in remapping of uploads have been fixed and there are tons of tests for it.
* Less disk space needed during restore, because uploads do not get copied before the migration to S3 anymore.
* Database runs as a new system process (`rake db:migrate`) instead of using the same process as the restore. This should fix a couple of weird bugs related to DB migrations. It's always migrating to the latest available DB migration (including plugin and post migrations). That simplifies that part of the code by a lot and prevents issues we previously saw with plugin migrations or missing post migrations.
* Most of the logic of the `migrate_to_s3` rake task was moved into the `ToS3Migration` class. This should make it easier to add tests in the future. All `exit` calls were replaced with exceptions to make it easier to handle exceptions during the restore process.
* Lots of other, smaller bugfixes and improvements.
* Roughly 200 new specs.
أغلق تقرير الخطأ هذا على أنه تم إصلاحه. يُرجى إنشاء تقرير خطأ جديد عند مواجهتك لخطأ أثناء الاستعادة وأنت تستخدم إصدار Discourse الذي اجتاز الاختبارات.
8 إعجابات