pub trait PlanExecutor:
Send
+ Sync
+ 'static {
// Required methods
fn execute_plan(
&self,
req: ExecuteRequest,
) -> impl Future<Output = ExecuteResponse> + Send;
fn execute_plan_streaming(
&self,
req: ExecuteRequest,
sink: impl ChunkSink,
) -> impl Future<Output = Option<TypedClusterError>> + Send;
}Expand description
Trait for executing a pre-planned PhysicalPlan on the local Data Plane.
Implemented in nodedb/src/control/exec_receiver.rs by LocalPlanExecutor.
The cluster RPC handler calls this when it receives an ExecuteRequest.
Responsibilities:
- Validate that
deadline_remaining_ms > 0. - For each
DescriptorVersionEntry, verify the local descriptor version matches. - Decode
plan_bytesvianodedb::bridge::physical_plan::wire::decode. - Dispatch through the local SPSC bridge.
- Collect response payloads.
- Map errors to
TypedClusterError.
Required Methods§
fn execute_plan( &self, req: ExecuteRequest, ) -> impl Future<Output = ExecuteResponse> + Send
Sourcefn execute_plan_streaming(
&self,
req: ExecuteRequest,
sink: impl ChunkSink,
) -> impl Future<Output = Option<TypedClusterError>> + Send
fn execute_plan_streaming( &self, req: ExecuteRequest, sink: impl ChunkSink, ) -> impl Future<Output = Option<TypedClusterError>> + Send
Streaming sibling of execute_plan.
Executes the plan and pushes each result frame to sink as it arrives.
Returns None on a clean EOF (all chunks delivered), or Some(err) on a
terminal failure — validation rejection, decode failure, deadline, or an
error pulled from the underlying result stream. A send_chunk error
(coordinator gone) is NOT a terminal error: the producer stops and
returns None, since there is no live peer to receive a terminal frame.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".