Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Cancel in-progress history suggestions requests #12469

Closed
Mugurell opened this issue Jul 11, 2022 · 0 comments · Fixed by #12496 or nathanmkaya/android-components#362
Closed

Cancel in-progress history suggestions requests #12469

Mugurell opened this issue Jul 11, 2022 · 0 comments · Fixed by #12496 or nathanmkaya/android-components#362
Assignees
Milestone

Comments

@Mugurell
Copy link
Contributor

Mugurell commented Jul 11, 2022

As a follow-up to mozilla-mobile/fenix#25875 and based on the discussions with @mhammond we should cancel all in-progress requests before making another ones to prevent against them being queued and so delaying getting the results for the last entered text for which we should provide suggestions.
For this we should use PlacesConnection.interrupt().

Important details:

  • the interrupt calls will cancel all reads so we need to ensure the PlacesReaderConnection is not used for other unrelated requests also.
  • the in-progress calls will fail with a special "OperationInterrupted" error, so we probably need to make sure these aren't reported to sentry or cause too much noise anywhere.

┆Issue is synchronized with this Jira Task

@Mugurell Mugurell self-assigned this Jul 11, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 11, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 11, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 11, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 11, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 14, 2022
Multiple readers allow to start and cancel history suggestions requests without
any impact on other in-progress PlacesApi queries.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 14, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 15, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 15, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 15, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 15, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 15, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 18, 2022
@mergify mergify bot closed this as completed in #12496 Jul 18, 2022
mergify bot pushed a commit that referenced this issue Jul 18, 2022
@github-actions github-actions bot added this to the 104.0.0 🥵 milestone Jul 18, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 19, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 19, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 28, 2022
…it interrupts

The OperationInterrupted exceptions are expected so logging them to the crash
servers has little use.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant