Skip to content

Keep the n, o and c keyspace event flags when A is set - #16142

Merged
minchopaskal merged 2 commits into
redis:unstablefrom
pirate329:fix-notify-flags-with-all
Nov 2, 2026
Merged

minchopaskal merged 2 commits into
redis:unstablefrom
pirate329:fix-notify-flags-with-all

Conversation

@pirate329

@pirate329 pirate329 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

n, o and c are not part of A, but keyspaceEventsFlagsToString() only prints them when A is not set. So:

CONFIG SET notify-keyspace-events KEAnoc
CONFIG GET notify-keyspace-events    -> "AKE"

The events still fire at runtime, but CONFIG REWRITE saves "AKE", so after a restart new-key, overwritten and type-changed events silently stop.

The fix prints these flags outside the A branch, the same way m is handled. KEAn now reads back as AnKE. Added cases to the existing CONFIG GET/SET flags test.

Same issue as #1491, where K and E were hidden by A. Found while fixing the same bug in Valkey (valkey-io/valkey#5199).

keyspaceEventsFlagsToString() printed n, o, c and r only when A was not set, but these flags are not part of A. So CONFIG SET notify-keyspace-events KEAn read back as AKE, and CONFIG REWRITE saved AKE, which silently disabled those events after a restart. Print them outside the A branch, like m.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T06:45:45.962027Z 116e159 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread src/notify.c Resolved
@pirate329 pirate329 changed the title Keep the n, o, c and r keyspace event flags when A is set Keep the n, o and c keyspace event flags when A is set Nov 2, 2026
@sundb sundb added the release-notes indication that this issue needs to be mentioned in the release notes label Nov 2, 2026
@sundb
sundb requested a review from minchopaskal November 2, 2026 07:04
@sundb sundb added this to Redis 8.12 Nov 2, 2026
@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.20%. Comparing base (669b2b9) to head (e20d220).
⚠️ Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable   #16142      +/-   ##
============================================
+ Coverage     78.16%   78.20%   +0.04%     
============================================
  Files           156      156              
  Lines         95120    95120              
============================================
+ Hits          74354    74393      +39     
+ Misses        20766    20727      -39     
Files with missing lines Coverage Δ
src/notify.c 99.37% <100.00%> (+0.62%) ⬆️

... and 25 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@minchopaskal minchopaskal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@minchopaskal

Copy link
Copy Markdown
Collaborator

Tnx, great catch @pirate329

@minchopaskal
minchopaskal merged commit f729b7c into redis:unstable Nov 2, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Redis 8.12 Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes indication that this issue needs to be mentioned in the release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants