diennea / herddb

A JVM-embeddable Distributed Database
https://herddb.org
Apache License 2.0
316 stars 46 forks source link

Checkpoint: Reorder operations #332

Open diegosalvi opened 5 years ago

diegosalvi commented 5 years ago

Actually checkpoint execute page manipulations as: cleanup dirty page

  1. cleanup dirty pages
  2. compact small pages
  3. flush temporary pages

Just step 3 is strictly needed.

The process should be changed as:

  1. flush temporary pages
  2. cleanup dirty pages
  3. compact small pages

With 3 timeout for the whole checkpoint, just cleanup phase and just compaction phase.

diegosalvi commented 5 years ago

Compaction & Cleanup timeouts already implemented. Remains operation reorder (with new changes could be even simpler...). Data remaining from last halfempty newpage will be used for dirty & small pages rebuild