Repository navigation
fix(map): Load All Features waits for a web source still opening #775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait_opensleeps the calling thread for up to 30 s.load_allis reached from tools and from Load All Features. If either runs on the UI thread, a slow or hung server freezes the app for the whole timeout, with no progress shown. Please confirm the callers. If any is on the UI thread, consider a shorter bound, or turning the "still opening" case into a "try again once it has opened" message.On timeout, the code falls through to
read_all. That returns the old "the layer's source isn't open" error, which hides the real cause (the source is slow). A specific message after the wait would be clearer. Confidence: medium.The new test relies on a 300 ms sleep to release the gate. It should be stable, since the wait is 30 s, but it is timing-dependent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Callers:
layer.loadAll, the export commands and the tools (gp). Each already reads the whole source synchronously on the thread that runs the command, network reads included, so waiting for the open is part of that same read. The wait is bounded, and the export path (sync_sourcewithblock) already waits up to 60 s the same way. On the web buildwait_opendoes not block.The message is fixed in 53cb50d. If the source still has not opened after the wait, the error is the source's own error, or "the layer's source is still opening: try again once it has opened", instead of "isn't open".
The test no longer relies on a timed release. It checks that the load is still waiting before it opens the gate.