Repository navigation
fix(store): read a part of a join side again in halves when its join gives up (#340) - #831
Open
MathiasVDA wants to merge 2 commits into
Open
MathiasVDA wants to merge 2 commits into
MathiasVDA wants to merge 2 commits into
Conversation
…gives up (#340) On a bulk-loaded store, a few land-use features with two geometries took each part of the side past the memory it was sized for, and the whole side was joined row by row instead. A part whose join gives up is now read again in halves, parts start at an eighth of the join memory, and the cross-product guard allows the rounded-up fanout estimates (16 rows per value, not 4).
Contributor
Author
|
The Generated by Claude Code |
Contributor
Author
|
Approved at 26c8d60. The halving ends (a part of one value that still gives up gives up the whole, as before), it also covers the parts #821 sizes from the query memory, and the new test and the 19 Generated by Claude Code |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Requested by Mathias · project thread
Refs #340 (a paid
ONLY=osm_track_landuserun must confirm)What and why
The confirmation run of #810 (bench run 47052744664) still logged
side ?w2 not read on term ids; joined another wayfor the land-use side at 1B triples.I reproduced it on bench-shaped data (13k tracks, 300k land-use areas, 1.5M buildings), bulk-loaded with
tripletrail load, with the join memory scaled to the same ratio.The cause:
Vecof rows then doubled past the join memory, and the merge join gave up.The fix, in
Snapshot::join_ids_each_part:How it was tested
a_part_that_gives_up_is_read_again_in_halvesintripletrail-store/tests/join_in_parts.rs. Without the halving it fails.cargo test -p tripletrail-store -p tripletrail-spatial -p tripletrailpasses (132 test binaries). Clippy-D warningsand fmt are clean.Documentation
docs/spatial-index.mdGenerated by Claude Code