-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Describe the enhancement requested
Based on the proposal in https://docs.google.com/document/d/1jhPyPZSOo2iy0LqIJVUs9KWPyFULVFJXTILDfkadx2g/edit# .
See also the discussion thread: https://lists.apache.org/thread/247z3t06mf132nocngc1jkp3oqglz7jp
Currently, it is undefined whether a client can call DoGet more than once. Clients may want to retry requests, and servers may not want to persist a query result forever.
Proposal
Add an expiration time to FlightEndpoint. If present, clients may assume they can retry DoGet requests. Otherwise, clients should avoid retrying DoGet requests.
message FlightEndpoint {
// In UTC.
google.protobuf.Timestamp expiration_time = 3;
}This proposal is not a full retry protocol.
Also, add “pre-defined” actions to Flight RPC for working with result sets. These are pre-defined Protobuf messages with standardized encodings for use with DoAction:
CancelQueryCancelFlightInfo: Asynchronously cancel the execution of a distributed query. (Replaces the equivalent Flight SQL action.)RefreshQueryRefreshFlightEndpoint: Request an extension of the expiration of a FlightEndpoint.CloseQueryCloseFlightInfo: Close a FlightInfo so that the server can clean up resources early.(OnlyCancelFlightInfowill be enough.)
This lets the ADBC/JDBC/ODBC drivers for Flight SQL explicitly manage result set lifetimes. These can be used with Flight SQL as regular actions.
Prior Art
- Dremio: job results are cleaned up after a set time.
- Google BigQuery Storage: read sessions include an explicit expiration time.
- Snowflake: result sets persist for 24 hours.
Component(s)
C++, FlightRPC