Prevent AffiliatedInvalidationServiceProvider from disconnecting in case of...
Prevent AffiliatedInvalidationServiceProvider from disconnecting in case of TRANSIENT_INVALIDATION_ERROR Currently AffiliatedInvalidationServiceProvider disconnects and connects again even in the case of TRANSIENT_INVALIDATION_ERROR. If there are lots of TRANSIENT_INVALIDATION_ERROR a lot of connection and disconnection of AffiliatedInvalidationServiceProvider will eventually cause throttling of registration requests. Handle the case of TRANSIENT_INVALIDATION_ERROR in the following way: 1. If there is an enabled InvalidationService, do not cause disconnection 2. If there is no InvalidationService available yet, do not cause connection, wait until TRANSIENT_INVALIDATION_ERROR is gone (Existing behaviour). 3. Upon receiving TRANSIENT_INVALIDATION_ERROR, post delayed task that will check InvalidationService to see if it switched to INVALIDATION_ENABLED. If InvalidationService still in TRANSIENT_INVALIDATION_ERROR state, cause the disconnection. 4. If the number of TRANSIENT_INVALIDATION_ERROR followed by disconnection in delayed task is above certain limit, do not disconnect. This is the best effort behaviour, keep registered topics registered and failed ones as failed. Bug: 1006706 Change-Id: Ie06f987eec12bc0f50a4c59098daf39ecf8bb12e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821529 Commit-Queue: Askar Aitzhan <askaraitzhan@google.com> Commit-Queue: Maksim Ivanov <emaxx@chromium.org> Auto-Submit: Askar Aitzhan <askaraitzhan@google.com> Reviewed-by:Maksim Ivanov <emaxx@chromium.org> Cr-Commit-Position: refs/heads/master@{#700814}
Showing
Please register or sign in to comment