Skip to content

Expose FlightCallOptions in InfluxDBClient3 constructor #36

@davide-t-tobe

Description

@davide-t-tobe

We're having some random issues while querying data from an InfluxDB Cloud Serverless instance (Version 2.0.0).

The exception logged is the following:
FlightUnavailableError: Flight returned unavailable error, with message: Received http2 header with status: 504

We observed this kind of exception almost once about 20 queries, on average (while testing the same query).

FlightClient seems to be configured with a default timeout of 60s. In order to try to overcome this issue, we would like to customize the timeout of do_get method, and implement a retry policy. In the current version of this library, however, FlightCallOptions are static initialized inside the constructor, as seen in this line:

self._options = FlightCallOptions(headers=[(b"authorization", f"Bearer {token}".encode('utf-8'))])

Is there an alternative way to handle this kind of exception?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions