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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// SPDX-License-Identifier: BUSL-1.1
//! Protocol-neutral transaction commit outcome + the single Data-Plane
//! dispatch seam the neutral orchestrator drives.
//!
//! Both pgwire and native build a [`TxnDataPlane`] over their own dispatch
//! path and hand it to [`run_commit`](super::commit::run_commit) /
//! [`run_rollback`](super::lifecycle::run_rollback) /
//! [`run_savepoint`](super::savepoint_ops::run_savepoint); the orchestrator
//! never references a transport type. Each transport maps the returned
//! [`CommitOutcome`] (and [`AbortReason`]) into its own wire response.
use Future;
use Pin;
use crate;
use PhysicalTask;
/// Terminal outcome of a COMMIT driven through the neutral orchestrator.
/// Why a COMMIT aborted. Each variant carries enough context for a transport
/// adapter to reproduce the SQLSTATE (and, where the payload allows, the
/// message) the pre-extraction path emitted.
/// The one Data-Plane dispatch seam the neutral transaction orchestrator uses.
///
/// A transport implements this over its own no-WAL dispatch path (pgwire keeps
/// its materialize-freeze gate; native routes through the gateway-or-SPSC
/// branch). `dispatch_no_wal` runs a single already-built [`PhysicalTask`] and
/// returns the neutral [`Response`], exactly as the transport's own single-task
/// dispatch would.
///
/// The returned future is boxed: the orchestrator awaits it inside the deeply
/// nested listener request pipeline, and a boxed (type-erased) future keeps that
/// async type-layout depth bounded rather than compounding per transport impl.