Skip to content

Commit 60a436b

Browse files
Update the default value of db.tx_log.rotation.retention_policy (#1239) (#1252)
In Neo4j 5.13, the def.value of the config `db.tx_log.rotation.retention_policy` was changed from `2 days` to `2 days 2G`. To reflect those changes, we have to update two pages in the Operations manual. --------- Co-authored-by: Reneta Popova <[email protected]>
1 parent d7505de commit 60a436b

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

modules/ROOT/pages/configuration/configuration-settings.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4653,7 +4653,7 @@ m|+++true+++
46534653
[[config_db.tx_log.rotation.retention_policy]]
46544654
=== `db.tx_log.rotation.retention_policy`
46554655

4656-
label:dynamic[Dynamic]
4656+
label:dynamic[Dynamic] label:changed[Default value changed in 5.13]
46574657

46584658
.db.tx_log.rotation.retention_policy
46594659
[frame="topbot", stripes=odd, grid="cols", cols="<1s,<4"]
@@ -4662,16 +4662,18 @@ label:dynamic[Dynamic]
46624662
a|Specify how long Neo4j should keep logical transaction logs to backup the database.
46634663
For example, `10 days` prunes logical logs that only contain transactions older than 10 days.
46644664
Alternatively, `100k txs` keeps the 100k latest transactions from each database and prunes any older transactions.
4665-
From Neo4j 5.9 onwards, you can optionally add a period-based restriction to the size of logs to keep, for example, `2 days 1G` prunes logical logs that only contain transactions older than 2 days or are larger than 1G.
4665+
From Neo4j 5.9 onwards, you can optionally add a period-based restriction to the size of logs to keep.
4666+
For example, `2 days 1G` prunes logical logs that only contain transactions older than 2 days or are larger than 1G.
46664667
|Valid values
46674668
a|a string which matches the pattern, `^(true\|keep_all\|false\|keep_none\|(\\d+[KkMmGg]?( (files\|size\|txs\|entries\|hours( \\d+[KkMmGg]?)?\|days( \\d+[KkMmGg]?)?))))$`
46684669
Must be `true` or `keep_all`, `false` or `keep_none`, or of format `<number><optional unit> <type> <optional space restriction>`.
46694670
Valid units are `K`, `M`, and `G`.
46704671
Valid types are `files`, `size`, `txs`, `entries`, `hours`, and `days`.
46714672
Valid optional space restriction is a logical log space restriction like `1G`.
4672-
For example, `1G size` limits logical log space on the disk to 1G per database, `200K txs` limits the number of transactions kept to 200 000 per database, and `2 days 1G` limits the logical log space on the disk to 1G at most 2 days per database.
4673+
For example, `1G size` limits logical log space on the disk to 1G per database, `200K txs` limits the number of transactions kept to 200 000 per database, and `2 days 1G` limits the logical log space on the disk to 1G at most 2 days per database. +
4674+
Starting from Neo4j 5.13, the default value is changed from `2 days` to `2 days 2G`.
46734675
|Default value
4674-
m|+++2 days+++
4676+
m|+++2 days 2G+++
46754677
|===
46764678

46774679
[[config_db.tx_log.rotation.size]]

modules/ROOT/pages/database-internals/transaction-logs.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,15 @@ Manually deleting transaction log files is not supported.
5959
You can control the number of transaction logs that Neo4j keeps to back up the database using the parameter xref:configuration/configuration-settings.adoc#config_db.tx_log.rotation.retention_policy[`db.tx_log.rotation.retention_policy`].
6060
This configuration setting is dynamic and can be changed at runtime.
6161

62-
By default, it is set to `2 days`, which means Neo4j keeps logical logs that contain any transaction committed within 2 days and prunes the ones that only contain transactions older than 2 days.
62+
Up to Neo4j 5.12, the default value is set to `2 days`, which means Neo4j keeps logical logs that contain any transaction committed within 2 days and prunes the ones that only contain transactions older than 2 days.
6363

6464
label:new[Introduced in Neo4j 5.9] +
6565
From Neo4j 5.9 onwards, you can optionally add a period-based restriction to the size of logs to keep.
6666
For example, `2 days 1G` prunes logical logs that only contain transactions older than 2 days or are larger than 1G.
6767

68+
label:new[Introduced in Neo4j 5.13] +
69+
Starting from Neo4j 5.13, the default value is changed to `2 days 2G`, which means Neo4j keeps logical logs that contain any transaction committed within 2 days from the current time and within the allocated log space (2G).
70+
6871
Other possible ways to configure the log retention policy are:
6972

7073
* `db.tx_log.rotation.retention_policy=true|keep_all` -- keep transaction logs indefinitely.

0 commit comments

Comments
 (0)