-
Notifications
You must be signed in to change notification settings - Fork 3
Namespace cache key collisions when colon is present #15
Copy link
Copy link
Open
Description
Summary
Cache keys are currently built by joining parts with a colon. When namespace and or idempotencyKey contain a colon, different logical inputs can map to the same Redis key.
Current behavior
Cache key format:
- without namespace: idempotent-executor-result:
- with namespace: idempotent-executor-result::
This can collide. Example:
- namespace = a, idempotencyKey = b:c
- namespace = a:b, idempotencyKey = c
Both map to idempotent-executor-result:a:b:c.
Impact
- Cross-namespace cache pollution.
- Wrong value or error replay for logically different operations.
Temporary mitigation
Avoid using colon in both namespace and idempotencyKey.
Proposed fix
Adopt an unambiguous cache key encoding strategy (for example, typed segments and or per segment encoding) and add regression tests for delimiter cases.
Acceptance criteria
- No collisions for any namespace plus idempotencyKey combinations.
- Backward compatibility strategy for existing cache entries is defined and tested.
- Tests cover delimiter-heavy inputs and mixed namespaced and non-namespaced usage.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels