Skip to content

fix(redis): persist no-expiration TTL updates - #2689

Merged
openai0229 merged 3 commits into
OtterMind:mainfrom
HandSonic:fix/redis-persist-no-expiration
Sep 3, 2026
Merged

openai0229 merged 3 commits into
OtterMind:mainfrom
HandSonic:fix/redis-persist-no-expiration

Conversation

@HandSonic

Copy link
Copy Markdown
Contributor

Summary

  • Send Redis PERSIST when an existing key changes from a positive TTL to no expiration.
  • Add regression coverage for TTL command selection.

Tests

  • RedisScriptExecutorUpdateTest: 7/7
  • Redis plugin test suite: 58/58
  • Redis plugin package build

Fixes #2681

@HandSonic
HandSonic requested a review from openai0229 as a code owner August 12, 2026 01:00
@openai0229 openai0229 moved this to In Review in Chat2DB Community Aug 12, 2026
@HandSonic
HandSonic force-pushed the fix/redis-persist-no-expiration branch 2 times, most recently from e747220 to 2ece48c Compare August 12, 2026 17:34
@HandSonic
HandSonic force-pushed the fix/redis-persist-no-expiration branch from 2ece48c to 730dea4 Compare August 19, 2026 19:40
openai0229
openai0229 previously approved these changes Aug 20, 2026

@openai0229 openai0229 left a comment

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.

The TTL transition logic is correct: a positive TTL still emits , and changing an existing non-permanent key to emits without affecting type-replacement flows. Tests cover the command selection. Approved.

@openai0229
openai0229 dismissed their stale review August 20, 2026 03:45

Superseded by a corrected review because shell quoting corrupted the submitted text.

openai0229
openai0229 previously approved these changes Aug 20, 2026

@openai0229 openai0229 left a comment

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.

The TTL transition logic is correct: a positive TTL still emits EXPIRE, and changing an existing non-permanent key to -1 emits PERSIST without affecting type-replacement flows. Tests cover the command selection. Approved.

@openai0229 openai0229 left a comment

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.

已基于最新主线复核并完成 Redis 7 实测。TTL 更新现在由用户提交的新值决定:正数执行 EXPIRE,-1 执行 PERSIST;不再依赖可能过期的旧 TTL 快照。聚焦测试 8/8、Redis 插件测试 60/60、Community 后端 48 模块打包及 Playwright 正数、转 -1、陈旧快照、取消路径均通过。

@openai0229
openai0229 merged commit 3d49f94 into OtterMind:main Sep 3, 2026
19 checks passed
@openai0229 openai0229 moved this from In Review to Done in Chat2DB Community Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug(redis): removing a key TTL does not persist the key

2 participants