windingtree / lpms-server

🖥 Light Property Management System Server
MIT License
2 stars 3 forks source link

perf: index garbage collector #31

Open Galeaf11 opened 2 years ago

Galeaf11 commented 2 years ago

Problem

The proposed solution for managing the leveldb creates a few indices that are used to store mappings. Over time, these indices will grow and potentially reduce the performance of lpms-server.

Solution

Establish a garbage collection routine whereby indices can automatically be trimmed from the database when not required. Care must be given not to delete information that would be required for audit purposes.

mfw78 commented 2 years ago

@lucarioams Can you please provide some input to this (not a high priority) as to how long lookup data / booking data should be retained, or do we just make this another configuration option, with a sane default value?

xdaluca commented 2 years ago

I think we should have a sane default here, e.g. 90-days. After that it gets deleted, they can chose to export it first and store it if they want.