redis / redis/agent-memory-server

deleteSummaryView does not clean up computed partition summaries

Open
#229 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
316
Forks
63
Avg merge
14d 23h
Merged PRs (30d)
1

Description

When a summary view is deleted via DELETE /v1/summary-views/{view_id}, the computed partition summaries are left behind as orphaned keys in Redis. Over time (or across repeated reset cycles), these accumulate and are never cleaned up.

Current behavior

delete_summary_view only removes:

  • summary_view:{view_id}:config (the view definition)
  • The view ID entry from summary_view:index (the index set)

It does not remove:
summary_view:{view_id}:summary:{partition_key} (computed partition summaries)

The source code confirms this is intentional-for-now:

async def delete_summary_view(view_id: str) -> None:
    """Delete a SummaryView config and remove it from the index.

    Stored partition summaries are left as-is for now; they can be cleaned
    up in a later pass if needed.
    """
    redis = await get_redis_conn()
    await redis.delete(_config_key(view_id))
    await redis.srem(_SUMMARY_VIEW_INDEX_KEY, view_id)

Expected behavior

delete_summary_view should also delete all computed partition summaries for the view

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the delete_summary_view function handling DELETE /v1/summary-views/{view_id}, then inspect the existing Redis key helpers for summary_view:{view_id}:summary:{partition_key}. Done means deleting the configuration, index entry, and every computed partition summary for the view without leaving orphaned Redis keys.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, redis
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.