╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────╮ │src/event/Issue.zig│ ╰───────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │13 // what the db stores: the event's data plus the commit-derived fields │ │14 pub const Record = struct { │ │15 event: Self, │ │16 - deleted: bool = false, │ │16 + removed: bool = false, │ │17 author_email: ?[]const u8 = null, │ │18 created_ts: u64 = 0, // the commit timestamp of the event that first created this issue│ │19 }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │104 record │ │105 else blk: { │ │106 var record = existing_record_maybe orelse return error.EventNotFound;│ │107 - record.deleted = true; │ │107 + record.removed = true; │ │108 break :blk record; │ │109 }; │ │110 │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │115 │ │116 // drop the old status's and tags' entries; active values are re-added below │ │117 const order_key = evt.orderKeyDesc(existing_record.created_ts, event_id); │ │118 - if (!existing_record.deleted) { │ │118 + if (!existing_record.removed) { │ │119 const status_set = try statusSet(DB, status_to_issues, existing_record.event.status); │ │120 _ = try status_set.remove(&order_key); │ │121 try removeFromTagSets(DB, tag_to_issues, existing_record.event.tags, existing_record.event.status, &order_key);│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │123 │ │124 // any event settles the conflict, since resolving in the ui may │ │125 // keep our own values and so change nothing to detect │ │126 - if (event_oid != null or record_to_write.deleted) _ = try conflicts.remove(&order_key); │ │126 + if (event_oid != null or record_to_write.removed) _ = try conflicts.remove(&order_key); │ │127 } │ │128 │ │129 try evt.writeOid(Self, DB, hash_kind, issue_id_to_field_to_oid, issue_key, if (existing_record_maybe) |existing| existing.event else null, record_to_write.event, event_oid);│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │131 const issue_cursor = try event_id_to_issue.putCursor(issue_key); │ │132 const issue = try DB.HashMap(.read_write).init(issue_cursor); │ │133 try evt.upsert(Record, DB, hash_kind, issue, record_to_write); │ │134 - try evt.indexEvent(DB, hash_kind, haxy_moment, event_id, .issue, record_to_write.created_ts); │ │134 + try evt.indexEvent(DB, hash_kind, haxy_moment, event_id, .issue, record_to_write.created_ts, record_to_write.removed);│ │135 │ │136 const order_key = evt.orderKeyDesc(record_to_write.created_ts, event_id); │ │137 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │138 - // the id set retains tombstones so merges can carry deletions │ │138 + // the id set retains removed records so merges can carry removals │ │139 if (existing_cursor_maybe == null) { │ │140 const issue_id_set_cursor = try haxy_moment.putCursor(hash.hashInt(hash_kind, id_set_key));│ │141 const issue_id_set = try DB.SortedSet(.read_write).init(issue_id_set_cursor); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │142 try issue_id_set.put(&order_key); │ │143 } │ │144 │ │145 - if (!record_to_write.deleted) { │ │145 + if (!record_to_write.removed) { │ │146 const status_set = try statusSet(DB, status_to_issues, record_to_write.event.status);│ │147 try status_set.put(&order_key); │ │148 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │204 defer arena.deinit(); │ │205 │ │206 const issue = (try readById(repo_kind, repo_opts, io, allocator, &arena, repo, id_bytes)) orelse return error.NotFound;│ │207 + if (issue.removed) return error.NotFound; │ │208 │ │209 var updated = issue.event; │ │210 switch (change) { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────╮ │src/event/Repo.zig│ ╰──────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │10 // what the db stores: the event's data plus the commit-derived fields │ │11 pub const Record = struct { │ │12 event: Self, │ │13 - deleted: bool = false, │ │13 + removed: bool = false, │ │14 created_ts: u64 = 0, // the commit timestamp of the event that first created this repo│ │15 │ │16 // a repo's key in the name index. it's unique per owner, so the read side │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │69 record │ │70 else blk: { │ │71 var record = existing_record_maybe orelse return error.EventNotFound;│ │72 - record.deleted = true; │ │72 + record.removed = true; │ │73 break :blk record; │ │74 }; │ │75 │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯