Skip to content

Define ownership and shutdown semantics for factory-created Redis clients #20

Description

@lan17

Priority

P1 — High — resolve before broad production adoption or large-scale use.

Problem

A lazy createClient factory can allocate and connect a client that DialCache retains indefinitely, but DialCache has no close/drain lifecycle. GLIDE separately owns script handles requiring dispose(), while the README broadly says DialCache does not close the underlying client.

Evidence:

Open decision

Either make every underlying client unequivocally caller-owned and rename the factory accordingly, or add a cache-owned lifecycle. Confirm before implementation.

Acceptance criteria

  • Document who creates, connects, owns, drains, disposes, and closes each resource.
  • Define shutdown behavior with operations in flight.
  • If a lifecycle method is added, make it idempotent and cover factory failure/retry.
  • Ensure GLIDE script disposal and connection ownership cannot be confused.
  • Add lifecycle tests for the approved design.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions