Skip to main content

Crate mz_adapter

Crate mz_adapter 

Source
Expand description

Coordinates client requests with the dataflow layer.

This crate hosts the โ€œcoordinatorโ€, an object which sits at the center of the system and coordinates communication between the various components. Responsibilities of the coordinator include:

  • Launching the dataflow workers.
  • Periodically allowing the dataflow workers to compact existing data.
  • Executing SQL queries from clients by parsing and planning them, sending the plans to the dataflow layer, and then streaming the results back to the client.
  • Assigning timestamps to incoming source data.

The main interface to the coordinator is Client. To start a coordinator, use the serve function.

Re-exportsยง

pub use crate::peek_client::PeekClient;
pub use crate::client::Client;
pub use crate::client::Handle;
pub use crate::client::SessionClient;
pub use crate::webhook::AppendWebhookError;
pub use crate::webhook::AppendWebhookResponse;
pub use crate::webhook::AppendWebhookValidator;
pub use crate::webhook::WebhookAppenderCache;

Modulesยง

active_compute_sink ๐Ÿ”’
Coordinator bookkeeping for active compute sinks.
catalog
Persistent metadata storage for the coordinator.
client
command ๐Ÿ”’
config
coord ๐Ÿ”’
Translation of SQL commands into timestamped Controller commands.
error ๐Ÿ”’
explain ๐Ÿ”’
EXPLAIN support for various intermediate representations.
flags
frontend_read_then_write ๐Ÿ”’
Frontend sequencing for read-then-write operations.
frontend_transaction ๐Ÿ”’
Completion of read-only transactions whose resources belong to the session.
metrics
notice ๐Ÿ”’
optimize ๐Ÿ”’
Optimizer interface to the adapter and coordinator code.
peek_client
peek_sequencing ๐Ÿ”’
session
Per-connection configuration parameters and state.
statement_logging
telemetry
Telemetry utilities.
util ๐Ÿ”’
webhook

Macrosยง

coord_bail ๐Ÿ”’

Structsยง

CollectionIdBundle
A bundle of storage and compute collection identifiers.
Config
Configures a coordinator.
CopyFromStdinWriter
A handle for pgwire to stream raw byte chunks to the coordinatorโ€™s parallel background batch builder tasks during COPY FROM STDIN.
ExecuteContext
Carries the session and statement state needed to retire an execution.
ExecuteContextExtra
State that the coordinator must process as part of retiring command execution. ExecuteContextExtra::Default is guaranteed to produce a value that will cause the coordinator to do nothing, and is intended for use by code that invokes the execution processing flow (i.e., sequence_plan) without actually being a statement execution.
ExecuteContextGuard
A guard that wraps ExecuteContextExtra and owns a channel for sending retirement messages to the coordinator.
ExecutionTime
Time from bound-statement execution to its first available result.
ReadHolds
Read holds kept to ensure a set of collections remains readable at some time.
RemoteSystemParameters
The result of load_remote_system_parameters.
StartupResponse
The response to Client::startup.
TimestampExplanation
Information used when determining the timestamp for a query.

Enumsยง

AdapterError
Errors that can occur in the coordinator.
AdapterNotice
Notices that can occur in the adapter layer.
AuthenticationError
ExecuteResponse
The response to SessionClient::execute.
ExecuteResponseKind
PeekResponseUnary
The response from a Peek, with row multiplicities represented in unary.
TimelineContext
An enum describing whether or not a query belongs to a timeline and whether the query can be affected by the timestamp at which it executes.
TimestampContext
The timeline and timestamp context of a read.

Traitsยง

ResultExt
TimestampProvider

Functionsยง

load_remote_system_parameters
serve
Serves the coordinator based on the provided configuration.
verify_datum_desc
Verify that the rows in RowIterator match the expected RelationDesc.