From 59fe17261e244b0d2c29a48fe4e07cbb6a99a842 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Wed, 19 Mar 2025 17:43:17 +0000 Subject: [PATCH] realm_export: Support up to 20GB of data via the UI. We have not see noticeable impact due to export size. --- zerver/tests/test_realm_export.py | 4 ++-- zerver/views/realm_export.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zerver/tests/test_realm_export.py b/zerver/tests/test_realm_export.py index fd1a481e7e..edc6791de7 100644 --- a/zerver/tests/test_realm_export.py +++ b/zerver/tests/test_realm_export.py @@ -302,10 +302,10 @@ class RealmExportTest(ZulipTestCase): subgroup="public_stream", ) - # Space limit is set as 10 GiB + # Space limit is set as 20 GiB with patch( "zerver.models.Realm.currently_used_upload_space_bytes", - return_value=11 * 1024 * 1024 * 1024, + return_value=21 * 1024 * 1024 * 1024, ): result = self.client_post("/json/export/realm") self.assert_json_error( diff --git a/zerver/views/realm_export.py b/zerver/views/realm_export.py index 2b56e552bd..aea4909a47 100644 --- a/zerver/views/realm_export.py +++ b/zerver/views/realm_export.py @@ -46,7 +46,7 @@ def export_realm( # # It's very possible that higher limits would be completely safe. MAX_MESSAGE_HISTORY = 250000 - MAX_UPLOAD_QUOTA = 10 * 1024 * 1024 * 1024 + MAX_UPLOAD_QUOTA = 20 * 1024 * 1024 * 1024 # Filter based upon the number of events that have occurred in the delta # If we are at the limit, the incoming request is rejected