Skip to content

docs(develop-docs): add redis TTL guidance page - #19160

Open
ldelvoye wants to merge 2 commits into
masterfrom
ldelvoye/feat/redis-ttl-develop-docs
Open

docs(develop-docs): add redis TTL guidance page#19160
ldelvoye wants to merge 2 commits into
masterfrom
ldelvoye/feat/redis-ttl-develop-docs

Conversation

@ldelvoye

@ldelvoye ldelvoye commented Aug 27, 2026

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

This adds a Redis page to the develop docs stating the TTL rules for new keys:
set a TTL or register the key as accepted durable data, a sliding EXPIRE is
not a bound, and some commands silently drop an existing TTL. The rules are
advisory for Snuba, Relay, Seer and the uptime checker, which have no shared
client to enforce through.

The page does not link the accepted-durable-keys list yet: that list has no
published home until INFRENG-455
lands, and that ticket includes adding the link here.

INFRENG-508

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace YYYY-MM-DD with the due date. You can update this information later by editing the PR description.

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've supplied a de

Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

@linear-code

linear-code Bot commented Aug 27, 2026

Copy link
Copy Markdown

INFRENG-508

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
develop-docs Ready Ready Preview Sep 8, 2026 6:37pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-docs Ignored Ignored Preview Sep 8, 2026 6:37pm UTC

Request Review

@github-actions github-actions Bot added the Priority: Normal Docs review has no urgent deadline label Aug 27, 2026
@ldelvoye
ldelvoye marked this pull request as ready for review August 27, 2026 20:11
@ldelvoye
ldelvoye requested a review from a team August 27, 2026 20:11
Comment thread develop-docs/backend/application-domains/redis.mdx

@markstory markstory left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. As we get further in the project this will be a great place to add developer docs for how to use the clients and delegator for workload splitting.

Comment thread develop-docs/backend/application-domains/redis.mdx Outdated
Comment thread develop-docs/backend/application-domains/redis.mdx Outdated
Comment thread develop-docs/backend/application-domains/redis.mdx Outdated
Comment thread develop-docs/backend/application-domains/redis.mdx Outdated
Drop the section on Snuba, Relay, Seer and the uptime checker. It
described a temporary gap: those services build their own Redis clients
today, but consolidating on a shared one is planned, so the section
would date quickly.
Comment on lines +29 to +36
Some write commands silently discard the TTL a key already has:

- `SET` and `GETSET` replace the value and drop the TTL. Pass `KEEPTTL` to `SET` if you mean to keep it.
- `SETEX` throws away the existing TTL and installs the one you pass.

Others leave the TTL alone: `SADD`, `ZADD`, `HSET`, `HINCRBY`, and `INCR` modify the value without touching the expiry.

None of them ever adds a TTL either. A key created through one of these commands has no expiry at all until something calls `EXPIRE` on it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The documentation incorrectly claims SETEX 'silently' discards a key's TTL. SETEX requires an explicit TTL, so this behavior is not silent.
Severity: LOW

Suggested Fix

Either rephrase the section heading 'Some write commands silently discard the TTL a key already has' to be more accurate, or move the description of SETEX to a separate section. Clarify that SETEX's behavior is explicit, as it requires a TTL parameter, unlike commands that can silently discard a TTL.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: develop-docs/backend/application-domains/redis.mdx#L29-L36

Potential issue: The documentation under the heading 'Some write commands silently
discard the TTL a key already has' incorrectly includes the `SETEX` command. Unlike
other commands that might implicitly remove a TTL, `SETEX` requires a new TTL value as a
mandatory parameter. This behavior is explicit, not silent. This mischaracterization can
mislead developers into thinking `SETEX` has hidden side effects similar to a `SET`
command without the `KEEPTTL` option, when its TTL handling is actually a core, required
part of the command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants