thesecretmaster / predis-v0

Like redis, but parallel and written from scratch for fun!
GNU General Public License v3.0
1 stars 0 forks source link

Use a deletion timestamp to speed up clean #11

Open thesecretmaster opened 5 years ago

thesecretmaster commented 5 years ago

Currently, when clean runs, it confirms that all applications have been in a safe state before going through and deleting everything in the deletion queue. Our implementation of this is safe, however, it isn't very performant. By incurring a small extra space cost, we could avoid a whole class of possible performance defects. Here's the proposal:

Notes:

  • Could we do this by killing safe and instead just using last_op_started and last_op_ended? Then checking something about the ordering?
  • Also, how can we ensure that the timestamps are reliable and not too expensive to calculate?