diff --git a/pages/querying/time-to-live.mdx b/pages/querying/time-to-live.mdx index 6f6d1ec5b..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. @@ -107,6 +113,12 @@ 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. + To stop and drop any index created, run: ```cypher @@ -203,7 +215,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