Skip to content

Python: Phase 2 client-side caching - server_assisted field and client_trackinginfo#5963

Draft
affonsov wants to merge 1 commit into
affonsov/client-side-caching-phase2from
affonsov/csc-phase2-python
Draft

Python: Phase 2 client-side caching - server_assisted field and client_trackinginfo#5963
affonsov wants to merge 1 commit into
affonsov/client-side-caching-phase2from
affonsov/csc-phase2-python

Conversation

@affonsov
Copy link
Copy Markdown
Collaborator

@affonsov affonsov commented May 15, 2026

Summary

Adds server_assisted field to Python ClientSideCache config and client_trackinginfo() diagnostic command.

Issue link

This Pull Request is linked to issue: Implement client-side caching Phase 2: server-assisted invalidation via CLIENT TRACKING
Closes #5961

Features / Behaviour Changes

  • server_assisted: bool = False field in ClientSideCache dataclass - enables server-assisted invalidation when True
  • client_trackinginfo() on CoreCommands base class (async + sync) - available on both standalone and cluster clients
  • client_trackinginfo(route=...) cluster override in cluster_commands.py for routing to specific nodes
  • client_trackinginfo() in BaseBatch

Implementation

  • cache.py: added server_assisted field to ClientSideCache dataclass
  • config.py: serializes server_assisted to protobuf in _set_client_side_cache_in_request()
  • core.py: client_trackinginfo() on CoreCommands base (no route) - routes to a single node, consistent with CLIENT INFO behavior
  • cluster_commands.py: cluster override with optional route parameter - use AllNodes() to get tracking info from all cluster connections

Limitations

  • server_assisted=True requires RESP3 protocol (enforced by glide-core)
  • In cluster mode, the no-arg variant routes to a single random node; use the route parameter to query all nodes

Testing

Checklist

  • This Pull Request is related to one issue.
  • Commit message has a detailed description of what changed and why.
  • Tests are added or updated.
  • CHANGELOG.md and documentation files are updated.
  • Linters have been run and Prettier has been run.
  • Destination branch is correct - main or release
  • Create merge commit if merging release branch into main, squash otherwise.

@affonsov affonsov force-pushed the affonsov/csc-phase2-python branch from cbbff0a to 11e6b65 Compare May 16, 2026 02:13
@affonsov affonsov force-pushed the affonsov/client-side-caching-phase2 branch from 25224b0 to 125fbf9 Compare May 16, 2026 02:25
@affonsov affonsov force-pushed the affonsov/csc-phase2-python branch 3 times, most recently from a5edad7 to 554849c Compare May 16, 2026 02:51
…isted caching

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
@affonsov affonsov force-pushed the affonsov/csc-phase2-python branch from 554849c to 87b6734 Compare May 16, 2026 03:04
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.

1 participant