danielealbano / cachegrand

cachegrand - a modern data ingestion, processing and serving platform built for today's hardware
BSD 3-Clause "New" or "Revised" License
975 stars 34 forks source link

Keys and data changes towards the snapshots threshold should take into account changes to existing keys #356

Closed danielealbano closed 1 year ago

danielealbano commented 1 year ago

Because of a combination of bugs, cachegrand is not taking into account changes to existing keys when verifying if the threshold for the amount of keys or data changed have been hit to run the snapshot.

The PR fixes this bug and refactor the code to allow skipping a snapshot run instead of running, indefinitely, consuming a lot of cpu cycles, checking if a snapshot can be taken or not.

The PR also improves the reporting in case of failures at the preparation stage (e.g. the directory indicated for the snapshots doesn't exist).