[Akonadi] [Bug 413631] auth failure goes offline but success not online again

Krzysztof Nowicki bugzilla_noreply at kde.org
Thu Oct 31 09:26:26 GMT 2019


https://bugs.kde.org/show_bug.cgi?id=413631

Krzysztof Nowicki <krissn at op.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|REPORTED                    |CONFIRMED

--- Comment #1 from Krzysztof Nowicki <krissn at op.pl> ---
What happens here is that most likely the OAuth access token expired, which is
normal after after a few hours. This caused the EWS request to fail and call
for reauthentication. Since the refresh token was valid, authentication
succeeded quickly and the resource is in theory back to life.

The reason for the offline state is the nature of the state machine inside of
the resource. When a request is processed, it has to be completed without delay
to the Akonadi server. OAuth authentication on the other hand involves sending
more requests to the authentication server, which would block for an unknown
amount of time. Time, which the EWS resource cannot wait. Therefore upon an
authentication failure the resource is immediately set to a temporary offline
state. The temporary nature means that Akonadi will automatically keep trying
to bring the resource back online after a short time (initially 60s, then every
300s). So if you would wait a bit longer the resource would come back online
automatically.

I know this behaviour is not optimal as in the described case the
authentication phase takes a split second and it would probably be possible to
avoid the offline state, but this would require some major architectural
changes.

I have actually been noticing this problem and started working on a fix (or an
optimisation), which shortens the retry time after the offline state has been
reached (initially 15s, gradually increasing up to 300s).

I am also testing the option to explicitly bring the resource online after an
authentication success. Initial attempts have resulted in some strange
behaviour, which means that I will need to test this more in order to assure
that it works reliably.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list