From 826993880ca82d998f58efe7f8cd73c2103e0e4d Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 7 Aug 2019 15:17:53 +0100 Subject: [PATCH 1/2] Excluded `mobiledoc_revisions` table from exports no issue - the `mobiledoc_revisions` table can grow very large in certain circumstances which can result in Out-Of-Memory errors when performing backups, resulting in failed upgrades - adds `mobiledoc_revisions` to the exporter excluded tables list as a temporary solution until we have safer export creation and/or improved revision handling --- core/server/data/exporter/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/data/exporter/index.js b/core/server/data/exporter/index.js index 6cf838c499c..29ac4d11a7e 100644 --- a/core/server/data/exporter/index.js +++ b/core/server/data/exporter/index.js @@ -6,7 +6,7 @@ var _ = require('lodash'), common = require('../../lib/common'), security = require('../../lib/security'), models = require('../../models'), - EXCLUDED_TABLES = ['accesstokens', 'refreshtokens', 'clients', 'client_trusted_domains', 'sessions'], + EXCLUDED_TABLES = ['accesstokens', 'refreshtokens', 'clients', 'client_trusted_domains', 'sessions', 'mobiledoc_revisions'], EXCLUDED_FIELDS_CONDITIONS = { settings: [{ operator: 'whereNot', From 6c386c42ca94c4abb547137f4b53489a52a1dcbe Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 12 Aug 2019 11:27:23 +0100 Subject: [PATCH 2/2] fix tests --- core/test/acceptance/old/admin/db_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/test/acceptance/old/admin/db_spec.js b/core/test/acceptance/old/admin/db_spec.js index e5376e04597..86d2571d6e8 100644 --- a/core/test/acceptance/old/admin/db_spec.js +++ b/core/test/acceptance/old/admin/db_spec.js @@ -66,7 +66,7 @@ describe('DB API', () => { const jsonResponse = res.body; should.exist(jsonResponse.db); jsonResponse.db.should.have.length(1); - Object.keys(jsonResponse.db[0].data).length.should.eql(26); + Object.keys(jsonResponse.db[0].data).length.should.eql(25); }); });