Skip to main content
Source

pub async fn submit_request<Req, Resp>( &self, endpoint: &str, req_schema: &FastSchema, resp_schema: &FastSchema, request: &Req, ) ->Result<Resp, KineticaError>
where Req: KineticaRecord, Resp: DeserializeOwned,

Submits a request to the Kinetica server with HA failover support.

This method implements HA failover:

  • Captures the current cluster switch count before attempting the request
  • On connection errors, attempts to switch to the next available cluster
  • Retries the request on the new cluster
  • Propagates API errors (server-side errors) without failover
  • endpoint - The API endpoint (e.g., “/show/table”)
  • req_schema - Pre-parsed Avro schema for the request
  • resp_schema - Pre-parsed Avro schema for the response
  • request - The request object

The response object, or an error if the request fails on all clusters.