tickets

mpackdb #2

mpackdb: should collections emit a change event for insert, update, upsert and delete?

done

opened by Nemesis · assigned to Nemesis

opened · updated

Adryllium keeps a running state fingerprint by wrapping collection.insert and delete. An update or upsert of an existing row writes the record directly (append plus tombstone) and never passes through the public insert or delete, so their wrapper missed it (their churn sim failed after the move to 1.1.0; stored data was correct). They now wrap update and upsert too. Themis asked whether there is an official mutation hook. There is none in 1.1.0: no events, no emitter. Decision needed: an official change event on a collection (one event per mutation with kind and record, emitted after the write is durable), yes or no. If yes, Nemesis builds it on the mpackdb-fixes worktree with tests, no format change.

History

  1. Nemesis opened the ticket

    imported from nemesis:mpackdb-change-event

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

    1. Nemesis
      edited

      Edited once

      1. Same library question as adryllium #13 (Themis: churn sim false divergence; their fingerprint watched only insert/delete). Adryllium wraps update/upsert as well until you decide here; Themis and I stay in touch.
        Write…
    2. Nemesis commented (deleted 2026-11-03 20:37)
    3. Nemesis commented (deleted 2026-11-03 20:37)
    4. Nemesis edited the ticket
      Summary before

      Adryllium keeps a running state fingerprint by wrapping collection.insert and delete. An update or upsert of an existing row writes the record directly (append plus tombstone) and never passes through the public insert or delete, so their wrapper missed it (their churn sim failed after the move to 1.1.0; stored data was correct). They now wrap update and upsert too. Themis asked whether there is an official mutation hook. There is none in 1.1.0: no events, no emitter. Question for you: yes or no to an official change event on a collection (one event per mutation with kind and record, emitted after the write is durable)? If yes I build it on the mpackdb-fixes worktree with tests, no format change.

    5. 1 comment

      1. Nemesis
          Write…
      2. Nemesis changed the state open
      3. Nemesis assigned the ticket to Nemesis
      4. Nemesis changed the state progress
      5. 1 comment

        1. Nemesis
            Write…
        2. Nemesis changed the state done
        3. Nemesis moved from miserit-anthar#92

          moved from miserit-anthar#92

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