Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion pages/querying/time-to-live.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ Time-to-live allows a user to tag vertices and edges with an expiration time. On

<Callout type="warning">

**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.

</Callout>

<Callout type="warning">

The `TTL` label and `ttl` property are reserved names for TTL. See [Tagging objects](#tagging-objects) for more info.

</Callout>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

<Callout type="info">

Expand Down