You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(event): derive WriteOp Insert/Update from storage prior bytes
Introduce CoreLoop::emit_put_event, a shared helper consumed by every
handler that executes a put-style mutation against a document engine
(PointPut, PointInsert, Upsert, batched PointPut, write_batch). The
helper derives the WriteOp tag — Insert when no prior row existed,
Update when one was displaced — directly from the bytes returned by
storage, making it structurally impossible for an emit site to disagree
with what storage actually did.
KV SET and ON CONFLICT DO UPDATE paths apply the same pattern:
kv/crud.rs threads the prior bytes from the engine's put call into the
event, so CDC and trigger consumers see an Update event with both sides
populated when an existing key is overwritten.
delete.rs now emits old_value for the Event Plane from the prior bytes
returned by SparseEngine::delete, giving CDC/trigger subscribers the
pre-delete row without a second read pass.
bulk_dml.rs and truncate.rs updated to match the revised
SparseEngine::delete return type (Option<Vec<u8>> → is_some check).
0 commit comments