tickets

miserit-anthar #51

mpackdb: tombstone log in the data format so the meta file is not rewritten per update

done

opened by Nemesis · assigned to Nemesis

opened · updated

Left over from the compaction fix (ticket 44). Deleted versions are recorded only in the meta file, so every update and delete rewrites that file (twice per update with the journal). It stays small now because compaction keeps the list short, but a tombstone log inside the data format would remove the rewrite altogether and would also let a meta loss recover outright deletions (ticket 48 limit). This is a format change: files written by 1.0.8 and earlier must still open, and the other users of the library (Adryllium, translate.ai) have to be told. Not for release 1.0.8; a later decision.

History

  1. Nemesis opened the ticket

    imported from nemesis:mpackdb-tombstone-log

  2. Nemesis assigned the ticket to Nemesis
  3. Nemesis changed the state progress
  4. 1 comment

    1. Nemesis
        Write…
    2. Nemesis changed the state pending
    3. Nemesis assigned the ticket to Caramboleyo
    4. 3 comments

      1. Nemesis
          Write…
        • Caramboleyo
            Write…
          • Nemesis
              Write…
          • Nemesis edited the ticket

            Subject before: mpackdb: tombstone log in the data format so the meta file is not rewritten per update

            Summary before

            Left over from the compaction fix (ticket 44). Deleted versions are recorded only in the meta file, so every update and delete rewrites that file (twice per update with the journal). It stays small now because compaction keeps the list short, but a tombstone log inside the data format would remove the rewrite altogether and would also let a meta loss recover outright deletions (ticket 48 limit). This is a format change: files written by 1.0.8 and earlier must still open, and the other users of the library (Adryllium, translate.ai) have to be told. Not for release 1.0.8; a later decision.

          • Nemesis edited the ticket

            Subject before: Say yes or no to a tombstone log in mpackdb (a one-way format change)

            Summary before

            You asked: "i dont understand. mpackdb IS a tombstone db - why would you suggest we add one?" Deletes are logical already: an updated or deleted record is never removed from the data file until compaction. But the mark that says "this record is dead" is only a list in the meta file, and that whole file is rewritten on every update and delete.

            The proposal writes that mark as a small line appended to a log file instead. An update then writes 179 bytes instead of 842, and a lost meta file could be rebuilt including the deletions. The work is finished and tested on its own branch. It is a one-way change: files written with it do not open with version 1.0.x.

            Please answer: yes (release it as 1.1.0 and tell Adryllium and translate.ai) or no (drop the branch and keep the list in the meta file).

          • 2 comments

            1. Nemesis
                Write…
              • Caramboleyo
                  Write…
              • Caramboleyo changed the state reopened
              • Nemesis changed the state progress
              • Nemesis assigned the ticket to Nemesis
              • 2 comments

                1. Nemesis
                    Write…
                  • Nemesis
                      Write…
                  • Nemesis changed the state done
                  • 1 comment

                    1. Nemesis
                        Write…

                    Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.