Skip to content

feat(plugins): limit store namespace size #552

Closed

Description

@uniqueg

Part of #545. Blocked by #550.

Problem

The first version of the plugin store (#550) bounds growth only by the entry size and a mandatory maximum TTL. A plugin that writes many distinct keys can still fill the database within one TTL window.

Proposal

  • Operator setting max_namespace_size (bytes) in plugins.defaults.store and per plugin.
  • Track the size per namespace approximately: a counter document per namespace, updated with $inc on set and delete; over the limit, set raises StoreError.
  • TTL expiry leaves the counter too high, so recount periodically (aggregate on {ns: 1}) at startup and every few minutes.
  • In-memory store: LRU eviction at the limit.

On hold until there is a need for it.

Done when

  • the limit is configurable, enforced by both backends, documented and tested (100% coverage).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: lowstatus: in progresstype: featureworkload: hours

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions