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

fixes #143: offline fetch bug fixes for v4, TileJSON, and marker feature URL - #147

Closed
incanus wants to merge 14 commits into
masterfrom
offlineFetch
Closed

incanus wants to merge 14 commits into
masterfrom
offlineFetch

Conversation

@incanus

@incanus incanus commented Jan 29, 2015

Copy link
Copy Markdown
Contributor

Needs a quick review & merge by @incanus.

bleege added 10 commits January 21, 2015 17:31
… / overhead at parsing downloaded content into json
…on parsing are downloaded for both iOS 7 and iOS 8
…N and not self created Marker URLs as they aren't guaranteed to be in the offline database. Adding JSONP cleaning to MBXRasterTileOverlay's download marker functionality.
…e Metadata otherwise race condition can occur where markers are loaded correctly, but there is a nil _mutableMarkers array so the loading fails silently
@incanus incanus added this to the 0.6.0 milestone Jan 29, 2015
@incanus incanus changed the title offline fetch bug fixes for v4, TileJSON, and marker feature URL fixes #143: offline fetch bug fixes for v4, TileJSON, and marker feature URL Jan 29, 2015
@incanus

incanus commented Jan 30, 2015

Copy link
Copy Markdown
Contributor Author

I think we should hit a couple light code quality details:

  • Some minor comment lines left like here & here
  • Variable naming like here
  • Some log verbosity like here & here

@ghost

ghost commented Feb 2, 2015

Copy link
Copy Markdown

@incanus have you had a chance to look at #149? Maybe @vinod1988's error message won't tell you anything you didn't already know, but it appears to have something to do with startDownloading: which gets changed in this PR. No mention of markers though.

@incanus

incanus commented Feb 3, 2015

Copy link
Copy Markdown
Contributor Author

@wsnook Yeah, thanks, let's see if we can repro and get more details about version there.

@bleege Is the stuff in #147 (comment) something you can hit while I try out functionality here in prep for release?

@bleege

bleege commented Feb 3, 2015

Copy link
Copy Markdown
Contributor

@incanus I'd be happy to... link is bad though. Are you referring to #149? If so I looked at it this morning and I think this PR will help address it.

@incanus

incanus commented Feb 3, 2015

Copy link
Copy Markdown
Contributor Author

No, sorry, I mean the three bullet points two comments above my last, about log verbosity, comments, and variable naming.

@bleege

bleege commented Feb 3, 2015

Copy link
Copy Markdown
Contributor

Ah! Will do.

@incanus

incanus commented Feb 3, 2015

Copy link
Copy Markdown
Contributor Author

I occasionally got some non-resumed downloads when going through test patterns of v3 & v4 start, pause, resume, and quit/restart app, but couldn't accurately repro a fail condition.

Along the way, though, I noticed logging like this:

2015-02-03 15:16:57.899 MBXMapKit[88865:3900456] total expected: 1423; total actually: 567
2015-02-03 15:16:57.900 MBXMapKit[88865:3900456] pathExtension = 'png'
2015-02-03 15:16:57.900 MBXMapKit[88865:3899954] total expected: 1423; total actually: 567
2015-02-03 15:16:57.900 MBXMapKit[88865:3899954] pathExtension = 'png'
2015-02-03 15:16:57.901 MBXMapKit[88865:3900456] total expected: 1423; total actually: 567
2015-02-03 15:16:57.901 MBXMapKit[88865:3900456] pathExtension = 'png'
2015-02-03 15:16:57.937 MBXMapKit[88865:3900456] total expected: 1423; total actually: 570
2015-02-03 15:16:57.938 MBXMapKit[88865:3900456] pathExtension = 'png'
2015-02-03 15:16:58.002 MBXMapKit[88865:3899954] total expected: 1423; total actually: 571
2015-02-03 15:16:58.002 MBXMapKit[88865:3899954] pathExtension = 'png'
2015-02-03 15:16:58.003 MBXMapKit[88865:3899952] total expected: 1423; total actually: 571
2015-02-03 15:16:58.004 MBXMapKit[88865:3899952] pathExtension = 'png'
2015-02-03 15:16:58.004 MBXMapKit[88865:3899952] total expected: 1423; total actually: 571
2015-02-03 15:16:58.004 MBXMapKit[88865:3899952] pathExtension = 'png'
2015-02-03 15:16:58.027 MBXMapKit[88865:3899943] total expected: 1423; total actually: 574
2015-02-03 15:16:58.027 MBXMapKit[88865:3899943] pathExtension = 'png'
2015-02-03 15:16:58.096 MBXMapKit[88865:3899943] total expected: 1423; total actually: 575
2015-02-03 15:16:58.096 MBXMapKit[88865:3899943] pathExtension = 'png'
2015-02-03 15:16:58.096 MBXMapKit[88865:3899943] total expected: 1423; total actually: 575
2015-02-03 15:16:58.097 MBXMapKit[88865:3899943] pathExtension = 'png'
2015-02-03 15:16:58.105 MBXMapKit[88865:3899943] total expected: 1423; total actually: 577
2015-02-03 15:16:58.105 MBXMapKit[88865:3899943] pathExtension = 'png'

The fact that some numbers are skipped and others are duped, makes me fear a possible race condition, but it could merely be a result of NSLog (actually, NSLogv under the hood) dropping some lines:

Output from NSLogv is serialized, in that only one thread in a process can be doing the writing/logging described above at a time.

@bleege

bleege commented Feb 3, 2015

Copy link
Copy Markdown
Contributor

@incanus Just finished the code cleanup.

@incanus incanus modified the milestones: 0.6.0, 0.6.1 Feb 4, 2015
incanus added a commit that referenced this pull request Feb 4, 2015
Revert "#143 - Refactoring to only request Marker data if it's been specified in TileJSON previously downloaded as part of the Offline save process"

This reverts commit faa420c.
@incanus

incanus commented Feb 4, 2015

Copy link
Copy Markdown
Contributor Author

Per chat with @willwhite we are going to pull v3 access from the library, so we should hit it here before merge since there's logic around markers.geojsonp vs. features.json, appending query string for token, and stuff like that.

@incanus

incanus commented Feb 10, 2015

Copy link
Copy Markdown
Contributor Author

Hitting this post-GL sprint, when we can merge & do a point release. @bleege

@bleege

bleege commented Feb 11, 2015

Copy link
Copy Markdown
Contributor

👍

@incanus incanus closed this Jan 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants