Open macro-shen opened 6 years ago
@macro-shen Are there any specific steps that we need to take to reproduce this issue, or simply by using the regular offline APIs we'll see this behavior?
cc: @tobrun @LukasPaczos
@zugaldia - They can reproduce the issue using our demo app. We can't reproduce this issue?
This is true, it looks like the user can download an unlimited amount of tiles at this point. I was able to reproduce the issue using our test app on release-boba
.
/cc @ivovandongen
What I'm seeing is that after downloading the first region, when starting a new download offline_database#markUsed
always returns false
here (even if it's on the other side of the world) https://github.com/mapbox/mapbox-gl-native/blob/136e536159a1e22aa4a92c4e6463893600b809d0/platform/default/mbgl/storage/offline_database.cpp#L628 even though the tiles are added to the database and their count is still increasing when checked with https://github.com/mapbox/mapbox-gl-native/blob/136e536159a1e22aa4a92c4e6463893600b809d0/platform/default/mbgl/storage/offline_database.cpp#L884-L888
This results in the counter not being incremented and a user can download as long as he doesn't stop downloading. Every download start will re-check https://github.com/mapbox/mapbox-gl-native/blob/136e536159a1e22aa4a92c4e6463893600b809d0/platform/default/mbgl/storage/offline_database.cpp#L884-L888
so if the user surpassed the limit during the previous download, it won't download any more tiles, otherwise, we'll see above issue again.
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
FYI @tmpsantos - this issue seems to originate in core.
Platform: Android Mapbox SDK version: 5.3.2
Actual behavior
As we know, Mapbox default maximum tile count of offline is 6000: https://www.mapbox.com/help/mobile-offline/#tile-ceiling--limits. But it seems user can still offline download tiles more than 6000 while user didn't set deleted to raise limit on client-side.
Could you help to check it?
cc: @zugaldia