Repository navigation
CMR-11378: StackOverFlow error in cmr search - #2533
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2533 +/- ##
==========================================
- Coverage 54.41% 54.41% -0.01%
==========================================
Files 1047 1047
Lines 73542 73542
Branches 2410 2409 -1
==========================================
- Hits 40018 40017 -1
Misses 31248 31248
- Partials 2276 2277 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
eereiter
approved these changes
Nov 4, 2026
zimzoom
reviewed
Nov 5, 2026
| (index/wait-until-indexed) | ||
| (is (d/refs-match? [whole-world] | ||
| (search/find-refs-with-post :collection {:polygon large-polygon | ||
| :provider "PROV1"}))))) |
Contributor
There was a problem hiding this comment.
We could add an assertion that a polygon exceeding max-polygon-points returns a 400
zimzoom
approved these changes
Nov 5, 2026
daniel-zamora
force-pushed
the
CMR-11378
branch
from
November 5, 2026 15:14
983329f to
4d881d6
Compare
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.
Overview
What is the objective?
Large
polygonandlinesearch params return a 500. The regex that validates them recurses once per point and overflows the stack at around 450 points, fewer in prod. Lines under 4500 characters have the same problem.What are the changes?
max-polygon-pointsconfig (CMR_MAX_POLYGON_POINTS, default 1000). A polygon over the limit returns a 400, the same asmax-line-points. The overflow used to cap polygons by accident, and validation cost grows with the square of the point count (5000 points takes about 3.4 s of search-app CPU), so the cap is now explicit.max-line-pointsnow applies to every line, not only lines over 4500 characters.What areas of the application does this impact?
Required Checklist
Additional Checklist