pub struct MergeSummary {Show 22 fields
pub kept_id: Uuid,
pub removed_id: Uuid,
pub edges_rewired: usize,
pub edges_self_loop_dropped: usize,
pub self_loop_edge_preimages: Vec<MergeEdgePreimage>,
pub self_loop_incident_edge_preimages: Vec<MergeEdgePreimage>,
pub edges_contract_skipped: usize,
pub contract_drop_edge_preimages: Vec<MergeEdgePreimage>,
pub contract_drop_incident_edge_preimages: Vec<MergeEdgePreimage>,
pub edge_conflict_preimages: Vec<MergeEdgeConflictPreimage>,
pub properties_merged: usize,
pub tags_unioned: usize,
pub content_appended: bool,
pub dry_run: bool,
pub tx_budget: MergeTxBudgetReport,
pub embedding_truncation: EmbeddingTruncationReport,
pub post_commit_reindex_error: Option<String>,
pub aliases_added: Vec<String>,
pub keys_moved: Vec<MergeKeyMove>,
pub keys_rewritten: usize,
pub keys_already_held: Vec<MergeKey>,
pub key_conflicts: Vec<MergeKeyConflict>,
}Expand description
Result returned by merge_entity / merge_note.
Fields§
§kept_id: Uuid§removed_id: Uuid§edges_rewired: usize§edges_self_loop_dropped: usizeEdges dropped because both rewired endpoints resolved to the
surviving record — the edge described a relationship between the
two merge operands (e.g. supports/refutes), and once merged that
relationship has no referent to point at, so it is deleted rather
than kept as a self-referencing row. Distinct from
edges_contract_skipped (an endpoint-contract rejection) and
edge_conflict_preimages (a natural-key collision with an unrelated
existing edge) — a self-loop has no such competitor.
self_loop_edge_preimages: Vec<MergeEdgePreimage>Full preimages for the edges counted in edges_self_loop_dropped, in
the same MergeEdgePreimage shape edge_conflict_preimages uses,
so a dropped relationship between the merge operands is recoverable
rather than silently destroyed by the row delete.
self_loop_incident_edge_preimages: Vec<MergeEdgePreimage>Recursive edge annotations removed with self-loop edges. The root
preimages remain in self_loop_edge_preimages.
edges_contract_skipped: usizeIncident edges dropped instead of rewired because the rewired
(source, relation, target) triple would violate the pack endpoint
contract link enforces (khive#1216) — consistent with the existing
dangling-endpoint skip behavior, never silently rewired into a
contract-violating edge.
contract_drop_edge_preimages: Vec<MergeEdgePreimage>Full preimages for the contract-violating root edges counted above.
contract_drop_incident_edge_preimages: Vec<MergeEdgePreimage>Recursive edge annotations removed with contract-violating edges.
edge_conflict_preimages: Vec<MergeEdgeConflictPreimage>Full preimages for natural-key edge conflicts resolved by this merge. Each entry names the surviving row, the dropped duplicate, and every incident edge cascaded with it so the destructive step is reversible.
properties_merged: usize§content_appended: bool§dry_run: bool§tx_budget: MergeTxBudgetReportRows and bytes this merge materialized against the per-transaction budget, alongside the limits it was admitted under. Enforcement already happened inside the transaction; this is the observed usage.
embedding_truncation: EmbeddingTruncationReportActual embedding-input truncation observed while reindexing the survivor.
post_commit_reindex_error: Option<String>Error returned by the post-commit survivor reindex. A set value means the entity or note merge committed but the reindex did not.
aliases_added: Vec<String>Names an entity merge added to the kept entity as merge aliases
(ADR-221 section 3): the merged-away entity’s name and aliases, and the
kept entity’s previous name when the merge takes the other name.
keys_moved: Vec<MergeKeyMove>Keys an entity merge moved from the merged-away entity to the kept one.
keys_rewritten: usizeHow many of keys_moved changed kind, which only a forced merge of
entities of different kinds does.
keys_already_held: Vec<MergeKey>Keys of the merged-away entity the kept entity already held; their rows on the merged-away entity were dropped.
key_conflicts: Vec<MergeKeyConflict>Keys another live entity holds under the kept entity’s kind. A merge
refuses with merge_key_conflict on any; a dry run lists them here.
Trait Implementations§
Source§impl Clone for MergeSummary
impl Clone for MergeSummary
Source§impl Debug for MergeSummary
impl Debug for MergeSummary
Source§impl<'de> Deserialize<'de> for MergeSummary
impl<'de> Deserialize<'de> for MergeSummary
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Forget for MergeSummary
impl Freeze for MergeSummarywhere
*const u8 is !null: Freeze,
PhantomData<MergeEdgePreimage>: Freeze,
PhantomData<MergeEdgeConflictPreimage>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<MergeKeyMove>: Freeze,
PhantomData<MergeKey>: Freeze,
PhantomData<MergeKeyConflict>: Freeze,
impl Move for MergeSummary
impl RefUnwindSafe for MergeSummary
impl Send for MergeSummary
impl Sync for MergeSummary
impl Unpin for MergeSummary
impl UnsafeUnpin for MergeSummarywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<MergeEdgePreimage>: UnsafeUnpin,
PhantomData<MergeEdgeConflictPreimage>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<MergeKeyMove>: UnsafeUnpin,
PhantomData<MergeKey>: UnsafeUnpin,
PhantomData<MergeKeyConflict>: UnsafeUnpin,
impl UnwindSafe for MergeSummary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more