From 55404cca9eced77055f4c8c24fa6b8e1a763848a Mon Sep 17 00:00:00 2001 From: Colin Barry Date: Tue, 10 Nov 2026 14:57:58 +0000 Subject: [PATCH 1/2] docs(ttl): keep TTL running or stopped across restarts and failovers --- pages/querying/time-to-live.mdx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pages/querying/time-to-live.mdx b/pages/querying/time-to-live.mdx index 6f6d1ec5b..74d0e8bb7 100644 --- a/pages/querying/time-to-live.mdx +++ b/pages/querying/time-to-live.mdx @@ -107,6 +107,14 @@ ENABLE TTL; **NOTE:** Once stopped, ttl can be re-enabled with the old configuration or a new one. +Memgraph remembers whether TTL is running or stopped: +- **Restart:** a TTL you enabled with the `ENABLE TTL` query runs again, and a TTL you stopped with the `STOP TTL` query stays stopped. +- **Promotion to MAIN:** a REPLICA promoted to MAIN resumes TTL unless you stopped it with the `STOP TTL` query. See [Replication](#replication). + +Before Memgraph 3.15, a running TTL could stay stopped after a restart, and promoting a REPLICA to MAIN resumed a stopped TTL. + +If you upgrade from a version earlier than Memgraph 3.15, TTL can stay stopped after the upgrade, because an earlier version can record a running TTL as stopped. Run the `ENABLE TTL` query on the MAIN instance for each database where TTL should run. It resumes TTL with its earlier configuration, and does nothing if TTL is already running. + To stop and drop any index created, run: ```cypher @@ -203,7 +211,7 @@ Time-to-live is fully integrated with replication: - The TTL background job executes only on the MAIN instance - All TTL deletions are automatically replicated to REPLICA instances - TTL configuration is now properly replicated across instances -- If an instance is a REPLICA, the TTL background job will be paused until the instance becomes MAIN +- If an instance is a REPLICA, the TTL background job is paused until the instance becomes MAIN, and then resumes unless you stopped it with the `STOP TTL` query From d373d6d1948f794e5e47a5746e2fc52244042d6c Mon Sep 17 00:00:00 2001 From: Colin Barry Date: Thu, 12 Nov 2026 12:37:59 +0000 Subject: [PATCH 2/2] Mark the TTL upgrade step as a breaking change in v3.15.0 --- pages/querying/time-to-live.mdx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/querying/time-to-live.mdx b/pages/querying/time-to-live.mdx index 74d0e8bb7..4aceeaf70 100644 --- a/pages/querying/time-to-live.mdx +++ b/pages/querying/time-to-live.mdx @@ -17,6 +17,12 @@ Time-to-live allows a user to tag vertices and edges with an expiration time. On +**Breaking change in v3.15.0**: TTL can stay stopped after you upgrade from an earlier version, because an earlier version can record a running TTL as stopped. Run the `ENABLE TTL` query on the MAIN instance for each database where TTL should run. It resumes TTL with its earlier configuration, and does nothing if TTL is already running. + + + + + The `TTL` label and `ttl` property are reserved names for TTL. See [Tagging objects](#tagging-objects) for more info. @@ -113,8 +119,6 @@ Memgraph remembers whether TTL is running or stopped: Before Memgraph 3.15, a running TTL could stay stopped after a restart, and promoting a REPLICA to MAIN resumed a stopped TTL. -If you upgrade from a version earlier than Memgraph 3.15, TTL can stay stopped after the upgrade, because an earlier version can record a running TTL as stopped. Run the `ENABLE TTL` query on the MAIN instance for each database where TTL should run. It resumes TTL with its earlier configuration, and does nothing if TTL is already running. - To stop and drop any index created, run: ```cypher