From 48e59bdd1884d69aa176d61f268b4b21e2beb831 Mon Sep 17 00:00:00 2001 From: Serdar Ozmen Date: Fri, 8 Mar 2024 10:12:39 +0300 Subject: [PATCH] Add data structure metadata notice to Persistence overview. (#1046) * Add data structure metadata notice to Persistence overview. * Update docs/modules/storage/pages/persistence.adoc Co-authored-by: rebekah-lawrence <142301480+rebekah-lawrence@users.noreply.github.com> * Update docs/modules/storage/pages/persistence.adoc Co-authored-by: rebekah-lawrence <142301480+rebekah-lawrence@users.noreply.github.com> * Update docs/modules/storage/pages/persistence.adoc Co-authored-by: rebekah-lawrence <142301480+rebekah-lawrence@users.noreply.github.com> * Update docs/modules/storage/pages/persistence.adoc Co-authored-by: rebekah-lawrence <142301480+rebekah-lawrence@users.noreply.github.com> * Update docs/modules/storage/pages/persistence.adoc Co-authored-by: rebekah-lawrence <142301480+rebekah-lawrence@users.noreply.github.com> --------- Co-authored-by: rebekah-lawrence <142301480+rebekah-lawrence@users.noreply.github.com> (cherry picked from commit 302533b3c575bca59938d6199bb6bea03cf95ca7) --- .../data-structures/pages/managing-map-memory.adoc | 4 ++-- docs/modules/storage/pages/persistence.adoc | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/modules/data-structures/pages/managing-map-memory.adoc b/docs/modules/data-structures/pages/managing-map-memory.adoc index 9bd3fecab..508bceca7 100644 --- a/docs/modules/data-structures/pages/managing-map-memory.adoc +++ b/docs/modules/data-structures/pages/managing-map-memory.adoc @@ -16,7 +16,7 @@ IMPORTANT: Expiration and eviction policies do not apply to locked map entries. An expiration policy limits the lifetime of an entry stored inside a map. When an entry expires it can no longer be read from the map and is scheduled to be removed to release memory. The actual removal will occur during the next garbage collection cycle. -To configure an expiration policy, use the elements `time-to-live-seconds`and `max-idle-seconds`. +To configure an expiration policy, use the elements `time-to-live-seconds` and `max-idle-seconds`. === time-to-live-seconds @@ -25,7 +25,7 @@ This element is relative to the time of a map's last write. For example a time t - Default value: 0 (disabled) - Accepted values: Integers between 0 and `Integer.MAX VALUE`. - By default, this configuration element applies to all entries in a map. To configure TTL for specific entries, see <>. +By default, this configuration element applies to all entries in a map. To configure TTL for specific entries, see <>. === max-idle-seconds diff --git a/docs/modules/storage/pages/persistence.adoc b/docs/modules/storage/pages/persistence.adoc index f550f78d2..c73434802 100644 --- a/docs/modules/storage/pages/persistence.adoc +++ b/docs/modules/storage/pages/persistence.adoc @@ -22,6 +22,18 @@ Clusters can use persisted data to recover from the following scenarios: You can persist the following: * Contents of map or JCache data structure ++ +[IMPORTANT] +==== +Hazelcast does not persist the metadata of your data structure entries, including time-to-live (TTL), to disk when xref:storage:configuring-persistence.adoc#quickstart-configuration[Persistence is enabled]. + +For example, assuming the following: + +* The cluster was started with persistence enabled and TTL configured to three hours for your map entries. +* The cluster was shut down and restarted two hours after the initial cluster start up. + +As TTL is metadata, which is not persisted when the cluster restarts, it is reset to the configured three hours from the time of the restart. Two hours have already passed before the restart, so the map entries now have a TTL value of five hours. +==== * Streaming job snapshots * SQL metadata, to avoid loss of SQL mappings, data connections, or views after a cluster restart.