Skip to main content

apply_op

Function apply_op 

Source
pub fn apply_op<E: ApplyEngine>(
    engine: &mut E,
    op: &ArrayOp,
) -> ArrayResult<ApplyOutcome>
Expand description

Apply op to engine, returning an outcome without panicking.

Steps:

  1. Shape validation — on error: Rejected(ShapeInvalid).
  2. Schema HLC check — NoneRejected(ArrayUnknown); op.header.schema_hlc > localRejected(SchemaTooNew).
  3. Idempotency — already seen → Idempotent.
  4. Dispatch to apply_put/apply_delete/apply_erase. Engine errors that indicate corruption (SegmentCorruption, HlcLockPoisoned) are propagated; all others become Rejected(EngineRejected).
  5. Tile-cache invalidation.
  6. Return Applied.