storex-sync icon indicating copy to clipboard operation
storex-sync copied to clipboard

SharedSyncLog cleanup function

Open ShishKabab opened this issue 6 years ago • 0 comments

To synchronize between clients, a SharedSyncLog is used to distribute log entries. Once all devices have sent and received all log entries up to a certain point, they can be deleted.

To implement:

  • Add a doPeriodicCleanup() : Promise<void> method to the SharedSyncLog interface
  • In SharedSharedSyncLogStorage.doPeriodicCleanup(), retrieve the device info for the devices of the current user
  • Get the minimum of the sharedUntil values of those devices.
  • Delete all log entries before that value

ShishKabab avatar May 21 '19 10:05 ShishKabab