Skip to content

Directory sessions table is growing without limit #616

@amrc-benmorrow

Description

@amrc-benmorrow

The session and schema_used tables in the Directory are growing without limit. #614 attempted to fix this but caused other issues with the database structure. The question needs a bit more thought.

There is an endpoint to expose the historical record but it has been disabled for a long time, so currently the only reason for keeping the historical data is so we can do change-notify. We can't work out what has changed without a record of the previous state. But the code and database schema here are fragile, and Directory MQTT change-notify has never been used, despite having been part of the F+ service system since its inception.

Options here are:

  • Fix Fix unbounded session table growth in directory #614 so it works correctly, keeping the session table but trimming it when we've done notify.
  • Keep some historical record but trim the table to the last month or so. Reinstate the history endpoint.
  • Remove change-notify. Remove the session table in favour of keeping current state only.
  • Move the Directory state into the ConfigDB. Work out some sensible way to use the classification facilities to provide useful change-notify via the ConfigDB channels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions