1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// SPDX-License-Identifier: BUSL-1.1
//! Sidecar value type for Calvin apply results (RETURNING rows).
use crateResponse;
/// The applied Data-Plane result for one completed Calvin transaction, carried
/// via [`SharedState::calvin_apply_results`] from the per-vShard scheduler to
/// the coordinator's completion path.
///
/// A cross-shard COMMIT may legitimately have MANY primary-write participants —
/// e.g. a multi-collection interactive transaction whose collections live on
/// different vShards deposits one plain (affected-count) write per participant.
/// Those coalesce: the sidecar keeps a single applied [`Single`](Self::Single)
/// response for the affected-count / rows the coordinator surfaces (which it
/// discards anyway for a COMMIT tag), and the extra plain-write siblings do not
/// conflict.
///
/// [`Conflict`](Self::Conflict) is recorded ONLY when two participants each carry
/// RETURNING rows — a cross-shard RETURNING union, which is genuinely
/// unsupported. The coordinator then fails the statement loudly rather than
/// returning one shard's partial rows.
///
/// [`SharedState::calvin_apply_results`]: crate::control::state::SharedState::calvin_apply_results