Skip to content

Flush import bulks on byte size, not just doc count - #1091

Merged
lonvia merged 1 commit into
komoot:masterfrom
entur:byte-aware-bulk-flush
Jun 30, 2026
Merged

Flush import bulks on byte size, not just doc count#1091
lonvia merged 1 commit into
komoot:masterfrom
entur:byte-aware-bulk-flush

Conversation

@henrik242

Copy link
Copy Markdown
Contributor

With -full-geometry a single document can carry a large polygon, so a fixed 10000 docs/bulk could exceed OpenSearch's http.max_content_length (100 MB) and fail with HTTP 413. Estimate each doc's size from its geometry point count and flush when either the count or a ~50 MB byte cap is reached.

Fixes #1090

With -full-geometry a single document can carry a large polygon, so a
fixed 10000 docs/bulk could exceed OpenSearch's http.max_content_length
(100 MB) and fail with HTTP 413. Estimate each doc's size from its
geometry point count and flush when either the count or a ~50 MB byte
cap is reached.

Fixes komoot#1090
Comment thread src/main/java/de/komoot/photon/opensearch/Importer.java
@lonvia
lonvia merged commit e53e89c into komoot:master Jun 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

413 Request Entity Too Large on -full-geometry import

2 participants