Repository navigation
fix(data): add a service's layers past the first 2000 by name, and say when a listing stops (#1519) - #1526
fix(data): add a service's layers past the first 2000 by name, and say when a listing stops (#1519)#1526elpidioassinaturas wants to merge 4 commits into
Conversation
…y when a listing stops (opengeos#1519) service.add answered "no layer" for a layer past position 2000 of the capabilities, and service.layers said nothing about the cut. IBGE's WFS lists 10,186 types and changes their order between answers, so the same command failed for some minutes and then worked. The WFS, WMS, WMTS, WCS and OGC API parsers now read up to 100,000 layers or collections from one document, and say how many they leave out past that. service.layers still stops at 2000 entries (Service::listed), now with a note. ArcGIS stays read up to 2000, with a note. wms_native looked through every ancestor's children for each layer, which is quadratic when layers share a parent; each layer's boxes are now read once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Code reviewBugs
Security
Performance
Quality
AGENTS.md
Already raised in earlier threads: none ( Change sizeCompared: the whole PR against main (merge base 3225fd6 to PR head b3d349f).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. |
…geos#1519) A name the document doesn't give keeps "(service.layers lists them)", with the read limit's note beside it: a mistyped name can't be told from one past the limit. The note now reads right for any count, and the new tests no longer split the opengeos#1053 test from its doc comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code reviewBugs
Security
Performance
Quality
AGENTS.md
Prior review threads
Checked and found fine
Change sizeCompared with main (merge base 3225fd6 to PR head 2b542aa), the whole PR.
|
opengeos#1519) On a service whose list is cut, the error for a name the document doesn't give now says how much service.layers shows. A WMS past the read limit with only unnamed layers left no longer notes "0 left out". The guide names ArcGIS as the exception to the 100,000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code reviewBugs
Security
Performance
Quality
AGENTS.md
Already raised, left alone: the merged Not verified: I could not compile or run tests here (no shell). I checked by reading that Change sizeCompared: the whole PR against main (merge base 3225fd6 to PR head f0df8df).
|
…CS identifiers (opengeos#1519) Each WMS layer still went through every box of its ancestors, so a parent with many boxes took quadratic time, and reading past 2000 layers made that worse: 50,000 boxes and 50,000 layers took 28.8 s on v0.5.0, over 2 minutes at 20,000 on this branch, and take 0.6 s now. A coverage with an identifier over 500 bytes was skipped silently and is now counted in a note. Past the read limit, the listing counts "the 100000 layers read", not the document's layers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code reviewI found no correctness bugs, crash paths, silent data loss, or security issues in the changed code. I checked the merge in Bugs: None found. Security: None found. Performance
Quality
AGENTS.md: No violations found. The new engine strings follow the existing untranslated engine notes. The WCS long-identifier and WMS unnamed-layer cases are tested both ways. Already raised: 9 earlier threads on this PR. All are resolved and I left them alone, because the code they point at matches the replies. The one about the merged Correction: My inline comment at Change sizeCompared with main (merge base 3225fd6 to PR head 141242a).
|

Summary
service.addansweredno layerfor a layer the service offers when it came past position 2000 of the capabilities, and nothing said the list had been cut. IBGE's WFS lists 10,186 types and changes their order between answers, so the same command failed for some minutes and then worked. The issue has the samples: #1519.The parsers now read past what
service.layersshows, soservice.add,service.coverageand identify find any layer of the document by name.MAX_READ_LAYERS), and say how many they leave out past that.service.layersstill stops at 2000 entries, through a newService::listed, and now adds a note:only the first 2000 of 10186 layers are listed; service.add takes any of them by name. The note appears in Add From Service and in the connections tree too. It replaces OGC API's own note.no layer 'x' (service.layers lists the first 2000 of 10186 layers). Past the read limit, that limit's note is added, since a mistyped name can't be told from a layer past it.Quadratic time in the WMS parser, also fixed.
wms_nativelooked through the children of every ancestor for each layer, which means all its siblings when the layers share one parent. That was already visible onmain: a document of 100,000 layers took 7.9 s though only 2000 were kept. Reading them all would have taken over 5 minutes, so each layer's boxes are now read once, by system (LayerBoxes). The per-layer work no longer depends on how many siblings or boxes a parent has.Choices and limits
ogc_discovery_preserves_all_offers_within_the_collection_limitkeeps them all listed:listedis set at the 2001st collection.incompleteis still set past 2000 collections, so a service group still refuses so long a list.service.addcan't find a layer past the first 2000 in a service's capabilities, and the cut is silent (IBGE's WFS fails or works depending on the answer's order) #1519 proposed. A service or directory is still read up to 2000 layers, folders and services, because a MapServer's layer is offered twice and the two loops mix, so there's no single place to stop its list. It now says how many it leaves out, and a layer past that is refused with the reason. I don't know of an ArcGIS service that long.MAX_DOCUMENT_TIME_VALUES(50,000 for the whole document) is spent in reading order, from the end of the document. A WMS with more than 2000 layers and more time values than that can now spend it on layers past the listing, leaving listed layers with fewer times. Untested, and no such service is known to me.Service::listedwith several documents: only OGC API follows documents, and only from a landing page, which has no collections of its own (collections_urlis set only there). So a document with collections always ends the chain, and it is the only one that setslisted: the listing is its 2000 collections' layers plus the few of the landing page before it.Testing
Measured with
service.addof a missing layer, given the document astext, so it reads everything and fetches nothing. v0.5.0 is a release build and this branch a dev build, so the times aren't strictly comparable; take them as upper bounds for the branch.WMS by number of layers on this branch: 16,000 in 195 ms, 100,000 in 1,233 ms. Before the fix, 16,000 took 2,776 ms.
With a real answer from IBGE's service, moving only
BDIA:pedo_area: positions 1, 2000, 2001 and 10181 all give 9 features (service.add, over the network). On v0.5.0, 2001 and 10181 gaveno layer.New tests:
a_document_past_the_read_limit_says_how_much_it_left_out: each of the nine kinds of document at its limit (no note) and past it (a note with the count).collections_past_the_listing_are_read_and_marked_incomplete.a_layer_past_the_listing_is_added_by_name: 2000 types with no note, 2001 with the note, the last one added from a local server, and a service group refusing 2001 collections.a_layer_past_the_read_limit_is_refused_saying_so: WFS, WCS, ArcGIS and two WMS documents, one of 100,001 layers under one parent and one of 50,000 boxes and 50,000 layers. The WMS parts take minutes if the quadratic time returns.a_coverage_with_a_long_identifier_is_said_to_be_left_out.cargo fmt,cargo clippyandcargo xtask layerspass.cargo test --workspace --no-fail-fastwithRUSTGIS_LANGUAGE=enon Windows: 4,237 passed, 1 failed, 20 ignored. The failure ismbtiles_archives_frame_the_map_on_their_bounds, which passes alone (3 of 3) and is flaky under load on this PC onmaintoo;pmtiles_archives_frame_the_map_on_their_bounds,an_oversized_ogc_items_binding_is_refused_before_native_fetchanda_reopened_http_raster_recovers_its_pixels_after_login_without_reloading_unchanged_pathsfailed the same way in some runs of this branch; all are known to fail onmainon this PC. That full run was before the review rounds; since then, theogc::tests, the engine's service tests and clippy on the two crates.service_loginsfails intermittently in parallel here and passes 3 of 3 with--test-threads=1. The branch is onmainat 3225fd6, not the latest; none of the four changed files differ there.UI evidence
One visible change, new text only: when a list is cut, a note appears in the existing notes area of Add From Service and the connections tree. The rest of the dialog is as before. Screenshot of IBGE's WFS, after:
Related issue
Closes #1519.
🤖 Generated with Claude Code