Having retries seems reasonable to me, I've added some comments on the linked doc.
Best, David On Wed, Nov 25, 2020, at 14:18, Wes McKinney wrote: > In principle adding a new error code for this seems reasonable to me. > What do you think about calling it something more generic like > "AUTH_EXPIRED"? I haven't looked at the details of the implementation > -- David Li or others may be able to provide better comments? > > On Fri, Nov 20, 2020 at 6:23 PM Keerat Singh <keer...@bitquilltech.com> wrote: > > > > I would like to propose the following enhancement to retry the failed > > Flight API call and refresh the access token on encountering > > FlightStatusCode.TOKEN_EXPIRED. > > For example when using an implementation of CallHeaderAuthenticator > > <https://github.com/apache/arrow/blob/master/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth2/CallHeaderAuthenticator.java> > > such as BearerTokenAuthenticator > > <https://github.com/apache/arrow/blob/master/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth2/BearerTokenAuthenticator.java> > > and the generated access token expires and FlightClient needs to detect > > that and retry the failed API call, along with the retry it needs to > > refresh the expired access token rather than having each client application > > write their own custom code with retry logic around this token expired > > workflow. > > > > More Details: > > > > - Arrow JIRA: https://issues.apache.org/jira/browse/ARROW-10671 > > - Design Proposal: > > > > https://docs.google.com/document/d/187DlGpIpOUPGhWvXVQEq0mXw_hdWjzzOuZp0p5qzBp0/edit?usp=sharing > > > > Regards, > > Keerat >