[Maps] [File upload] Fix maps geojson upload hanging on index step#42623
[Maps] [File upload] Fix maps geojson upload hanging on index step#42623kindsun merged 6 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-gis |
💔 Build Failed |
|
retest |
💚 Build Succeeded |
x-pack/legacy/plugins/maps/public/layers/sources/client_file_source/geojson_file_source.js
Outdated
Show resolved
Hide resolved
|
A good test for this one woudl be the file linked here: https://discuss.elastic.co/t/custom-vector-maps-with-accents/194075/3 It's a small-ish file, with smallish number of features (a few thousand), but large-ish geometries. Can you upload this file now after this PR? |
Nice dataset. Uploaded without issue! |
💚 Build Succeeded |
thomasneirynck
left a comment
There was a problem hiding this comment.
See comment to clean up redundant branching and trim some LOC/tmp vars.
Geojson is getting real nice with all the recent bug fixes. We're getting to upload some real-world datasets without a hitch. 👏
💚 Build Succeeded |
…lastic#42623) * Remove timeout from fetch. Falls back to 30 second timeout on server-side indexing call * Handle when indexing request is a success but every doc failed * Return failures array from catch * Review feedback * Review feedback
…p-metrics-selectall * 'master' of github.com:elastic/kibana: (306 commits) [ML] Adding job overrides to the module setup endpoint (elastic#42946) [APM] Fix missing RUM url (elastic#42940) close socket timeouts without message (elastic#42456) Upgrade elastic/charts to 8.1.6 (elastic#42518) [ML] Delete old AngularJS data visualizer and refactor folders (elastic#42962) Add custom formatting for Date Nanos Format (elastic#42445) [Vega] Shim new platform - vega_fn.js -> vega_fn.js , use ExpressionFunction (elastic#42582) add socket.getPeerCertificate to KibanaRequest (elastic#42929) [Automation] ISTANBUL PRESET PATH is not working fine with constructor(private foo) (elastic#42683) [ML] Data frames: Updated stats structure. (elastic#42923) [Code] fixed the issue that the repository can not be deleted in some cases. (elastic#42841) [kbn-es] Support for passing regex value to ES (elastic#42651) Connect to Elasticsearch via SSL when starting kibana with `--ssl` (elastic#42840) Add Elasticsearch SSL support for integration tests (elastic#41765) Fix duplicate fetch in Visualize (elastic#41204) [DOCS] TSVB and Timelion clean up (elastic#42953) [Maps] [File upload] Fix maps geojson upload hanging on index step (elastic#42623) [APM] Use rounded bucket sizes for transaction distribution (elastic#42830) [yarn.lock] consistent resolve domain (elastic#42969) [Uptime] [Test] Repurpose unit test assertions to avoid flakiness (elastic#40650) ...
…lastic#42623) * Remove timeout from fetch. Falls back to 30 second timeout on server-side indexing call * Handle when indexing request is a success but every doc failed * Return failures array from catch * Review feedback * Review feedback # Conflicts: # x-pack/legacy/plugins/maps/public/layers/sources/client_file_source/geojson_file_source.js
…tep (#42623) (#43033) * [Maps] [File upload] Fix maps geojson upload hanging on index step (#42623) * Remove timeout from fetch. Falls back to 30 second timeout on server-side indexing call * Handle when indexing request is a success but every doc failed * Return failures array from catch * Review feedback * Review feedback # Conflicts: # x-pack/legacy/plugins/maps/public/layers/sources/client_file_source/geojson_file_source.js * Indentation

Resolves #40102. Indexing would hang when requests exceeded the allotted timeout of 10 seconds, at which point
fetchWithTimeoutwould returnnull, causing downstream issues. This PR makes a couple of changes:callWithRequestwhich times out after 30 secondsAttached are two files used for test. The indexing of the larger of the two files,
addresses.geo.jsonexceeded the previous timeout of 10 seconds on account of using a reserved field_idin all docs. Previously this behavior resulted in the issue described, now it times out on the server side and the message is sent back to the client. The smaller fileshort_addresses.geo.jsondoesn't exceed any timeouts but is returned a success with all docs failed. This is correctly handled as a non-addable layer.long_and_short_addresses_test_files.tar.gz