Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Fix offline region download freezing #16230

Merged
merged 4 commits into from
Feb 25, 2020

Conversation

pozdnyakov
Copy link
Contributor

Downloaded resources are put in the buffer and inserted in the database in batches.

Before this change, the buffer was flushed only at the network response callback
and thus it never got flushed if the last required resources were present locally
and did not initiate network requests -> it caused freezing.

Now the buffer is flushed every time the remaining resources container gets empty.

Fixes https://github.com/mapbox/mapbox-gl-native-team/issues/195

@pozdnyakov pozdnyakov added bug Core The cross-platform C++ core, aka mbgl offline labels Feb 25, 2020
@pozdnyakov pozdnyakov marked this pull request as ready for review February 25, 2020 16:12
Downloaded resources are put in the buffer and inserted in the database in batches.

Before this change, the buffer was flushed only at the network response callback
and thus it never got flushed if the last required resources were present locally
and did not initiate network requests -> it caused freezing.

Now the buffer is flushed every time the remaining resources container gets empty.
Thus we do not need to include specific headers to use `{set|get}Property`
API with key constants.
@pozdnyakov pozdnyakov force-pushed the mikhail_fix_offline_download_freezing branch from bd0f50e to 23de1eb Compare February 25, 2020 20:27
@pozdnyakov pozdnyakov merged commit 384681a into master Feb 25, 2020
@pozdnyakov pozdnyakov deleted the mikhail_fix_offline_download_freezing branch February 25, 2020 21:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Core The cross-platform C++ core, aka mbgl offline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants