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.





  • A bundle of storage and compute collection identifiers.
  • Configures a coordinator.
  • Bundle of state related to statement execution.
  • 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.
  • ReadHolds are used for short-lived read holds. For example, when processing peeks or rendering dataflows. These are never downgraded but they are released automatically when being dropped.
  • Inner state of ReadHolds. We have this separate so that we can send the inner state along a channel, for releasing when dropped.
  • The response to Client::startup.
  • Information used when determining the timestamp for a query.




Type Aliases§