Skip to content

Fix latest checkpoint pointers for custom prefixes#188

Open
limjoobin wants to merge 2 commits into
mainfrom
fix/checkpoint-prefix-isolation
Open

Fix latest checkpoint pointers for custom prefixes#188
limjoobin wants to merge 2 commits into
mainfrom
fix/checkpoint-prefix-isolation

Conversation

@limjoobin
Copy link
Copy Markdown

Fixes #187.

Summary

Latest-pointer keys were always written as checkpoint_latest:{thread_id}:{checkpoint_ns}, ignoring configured checkpoint_prefix values. Since the checkpoint document keys honour checkpoint_prefix, two deployments with different checkpoint prefixes could overwrite each other's latest pointer when using the same thread ID and namespace.

This PR fixes latest checkpoint pointer keys so custom checkpoint_prefix values fully isolate saver instances sharing the same Redis Stack.

Fixes

This PR changes latest-pointer keys to use {checkpoint_prefix}_latest:{thread_id}:{checkpoint_ns}. The default prefix still produces checkpoint_latest:*, preserving compatibility for existing default deployments.

Tests

  • Added sync and async regression coverage for custom-prefixed latest pointer writes.
  • Added sync and async regression coverage for two savers sharing Redis with different prefixes and latest lookup without checkpoint_id.

@limjoobin limjoobin self-assigned this May 24, 2026
@limjoobin limjoobin requested a review from vishal-bala May 28, 2026 04:28
@limjoobin limjoobin marked this pull request as ready for review May 28, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

checkpoint_latest:* pointer keys ignore checkpoint_prefix, colliding across savers on a shared Redis Stack

1 participant