Skip to content

Do not create a new meter ID for every new profile agent (for its keystore), just reuse the same one #56

Description

@dlongley

A new profile agent needs a keystore -- which requires a meter to authorize its creation. Only one meter should be created for this and it should be reused each time (but this differs from current behavior, so it should be fixed).

When a new profile is created, the root profile agent is created using the same newly created meter for the profile (with the controller of the meter set to the profile, allowing profile to create more keystores as desired). This can remain the same without issue.

But when a new profile agent is independently created for use with an existing profile, a new meter is created, controlled by the application (and this controller is never changed), in order to create the keystore for the profile agent. No reference to this new meter is kept so it effectively generates "garbage". This extra meter creation per profile agent is unnecessary and should be fixed. Only one meter is required for creating profile agent keystores -- and its controller can remain the application without issue. Then, whenever a new profile agent needs to be created, this meter can be referenced and reused w/o the proliferation of unnecessary meters (to which no references are even kept).

See: https://github.com/digitalbazaar/bedrock-profile-http/blob/v23.0.0/lib/http.js#L139

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions