From cc0ae0b9eed662f91427f7b796799a9fba53731c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Mon, 7 Apr 2025 12:49:05 +0200 Subject: [PATCH 1/5] Added description of the grace period --- .../configuration/repository_configuration.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/administration/configuration/repository_configuration.md b/docs/administration/configuration/repository_configuration.md index 2378957430..d0def68938 100644 --- a/docs/administration/configuration/repository_configuration.md +++ b/docs/administration/configuration/repository_configuration.md @@ -198,6 +198,26 @@ This limit is enforced on publishing a new version and only covers archived vers In Legacy storage engine you can see performance degradation if you store too many versions. The default value of 5 is the recommended value, but the less content you have overall, the more you can increase this to, for instance, 25 or even 50. +### Grace period for archived versions + +After a new version of a content is published, for a period of time the previous version (now archived) can still be loaded using the same permission set as the published version. + +This period is called the grace period and it prevents race conditions that can occur when a new version is published in parallel to someone accessing the content item. + +The duration can be configured using the `grace_period_in_seconds` setting. +After a version has been archived for longer than specified in the configuration, the grace period ends and the version is treated as all archived versions, including the need of [`content/versionread` policy](policies.md#content) to access it. + +``` yaml +ibexa: + repositories: + default: + options: + grace_period_in_seconds: 30 +``` + +`grace_period_in_seconds` uses the [PHP's `max_execution_time`](https://www.php.net/manual/en/info.configuration.php#ini.max-execution-time) value by default. +Set the value to 0 do disable grace period for archived versions. + ### Removing versions on publication With `remove_archived_versions_on_publish` setting, you can control whether versions that exceed the limit are deleted when you publish a new version. From 164395926d478659a15c47cc8ce35e2a12526091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Mon, 7 Apr 2025 13:02:54 +0200 Subject: [PATCH 2/5] Fixed "in parallel" usage --- docs/administration/configuration/repository_configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/administration/configuration/repository_configuration.md b/docs/administration/configuration/repository_configuration.md index d0def68938..1f21cc5e14 100644 --- a/docs/administration/configuration/repository_configuration.md +++ b/docs/administration/configuration/repository_configuration.md @@ -202,7 +202,7 @@ This limit is enforced on publishing a new version and only covers archived vers After a new version of a content is published, for a period of time the previous version (now archived) can still be loaded using the same permission set as the published version. -This period is called the grace period and it prevents race conditions that can occur when a new version is published in parallel to someone accessing the content item. +This period is called the grace period and it prevents race conditions that can occur when a new version is published at the same time as someone is accessing the content item. The duration can be configured using the `grace_period_in_seconds` setting. After a version has been archived for longer than specified in the configuration, the grace period ends and the version is treated as all archived versions, including the need of [`content/versionread` policy](policies.md#content) to access it. From f92f5d282ffeba041b5b0095bbd72d0ad5e1af75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Mon, 7 Apr 2025 13:21:23 +0200 Subject: [PATCH 3/5] Wording --- docs/administration/configuration/repository_configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/administration/configuration/repository_configuration.md b/docs/administration/configuration/repository_configuration.md index 1f21cc5e14..4a8de69eb9 100644 --- a/docs/administration/configuration/repository_configuration.md +++ b/docs/administration/configuration/repository_configuration.md @@ -205,7 +205,7 @@ After a new version of a content is published, for a period of time the previous This period is called the grace period and it prevents race conditions that can occur when a new version is published at the same time as someone is accessing the content item. The duration can be configured using the `grace_period_in_seconds` setting. -After a version has been archived for longer than specified in the configuration, the grace period ends and the version is treated as all archived versions, including the need of [`content/versionread` policy](policies.md#content) to access it. +After a version has been archived for longer than specified in the configuration, the grace period ends and the version is treated the same as all the other archived versions, including the need of [`content/versionread` policy](policies.md#content) to access it. ``` yaml ibexa: From 7e56d3f8de538517136ad29f6dd25096c0f1c442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Mon, 7 Apr 2025 13:56:14 +0200 Subject: [PATCH 4/5] Update docs/administration/configuration/repository_configuration.md --- docs/administration/configuration/repository_configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/administration/configuration/repository_configuration.md b/docs/administration/configuration/repository_configuration.md index 4a8de69eb9..69e0b04e6f 100644 --- a/docs/administration/configuration/repository_configuration.md +++ b/docs/administration/configuration/repository_configuration.md @@ -216,7 +216,7 @@ ibexa: ``` `grace_period_in_seconds` uses the [PHP's `max_execution_time`](https://www.php.net/manual/en/info.configuration.php#ini.max-execution-time) value by default. -Set the value to 0 do disable grace period for archived versions. +Set the value to 0 to disable grace period for archived versions. ### Removing versions on publication From 0adbfc974728f7c7387883d00e1236c2748f8467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 8 Apr 2025 11:22:23 +0200 Subject: [PATCH 5/5] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tomasz DÄ…browski <64841871+dabrt@users.noreply.github.com> --- docs/administration/configuration/repository_configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/administration/configuration/repository_configuration.md b/docs/administration/configuration/repository_configuration.md index 69e0b04e6f..21e65f9375 100644 --- a/docs/administration/configuration/repository_configuration.md +++ b/docs/administration/configuration/repository_configuration.md @@ -200,7 +200,7 @@ This limit is enforced on publishing a new version and only covers archived vers ### Grace period for archived versions -After a new version of a content is published, for a period of time the previous version (now archived) can still be loaded using the same permission set as the published version. +After a new version of a content item is published, the previous version, now archived, can still be loaded for a certain period of time, using the same permission set as the published version. This period is called the grace period and it prevents race conditions that can occur when a new version is published at the same time as someone is accessing the content item.