Comcast / sirius

A distributed system library for managing application reference data
http://comcast.github.io/sirius/
Apache License 2.0
298 stars 49 forks source link

Add backup_wal.sh and remove compacting dirs #114

Closed weggert closed 9 years ago

weggert commented 9 years ago

This change adds a new script, backup_wal.sh. It is the equivalent of compact_wal.sh, however it does not try to do any compacting. It simply makes a backup of uberstore.

The change also adds a step to both compact_wal.sh and backup_wal.sh to remove any .compacting directories that exist. These directories are created during live compaction and are temporary. If Sirius is stopped during compaction, they may exist and if the timing is right they can almost double the size of the uberstore.

They would be deleted when the first compaction starts anyway, so they serve no useful purpose and can be deleted to save disk space.

clinedome-work commented 9 years ago

This looks good. It will be safe to remove any .compacting directories as long as Sirius isn't running. It'd be nice to add a "running" detection, but there's no way to detect that, so I'm fine with this. It might be a good idea to add a "don't execute this while your application is running" comment in the script. Past that, I'm :+1: here.

weggert commented 9 years ago

Per the feedback I added a warning to the documentation in the scripts.

clinedome-work commented 9 years ago

Looks good. :+1: