index-management icon indicating copy to clipboard operation
index-management copied to clipboard

Provide Useful Error Messages when Transforms Fail

Open JeffBolle opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. When working with complex index transforms that operate over highly variable data sets, errors are sometimes encountered. These can be indexing errors or "search" errors (and maybe other errors that I haven't yet seen). However, in every case where my transforms have produced an error, the output from the transform API explain endpoint and the UI have been unhelpful. They have done absolutely nothing to help me understand which document caused the error, what the underlying error message was, and give me a path to resolving it.

Describe the solution you'd like I would like for the relatively detailed error message that was originally produced by the failure in the transform to be returned when calling the _explain endpoint for a given transform. This can be the index mapping error, the script error, etc. as well as the document index and id that caused the error to allow for deeper investigation and more timely error resolution. Additionally, specific errors should be produced when the transform fails because the page size is too large that help make that clear. It appears that when errors are encountered because of the page size being too large, they are categorized as "indexing" errors by the transform.

Describe alternatives you've considered My current transform debugging method is to do the following:

  1. Find the last good indexed document or group of documents (depending on the transform).
  2. Create a new copy of the destination index
  3. Create a new copy of the transform, using a range query in the data_selection_query to begin the transform near the location of the last failure, and setting the page size to 1.
  4. Use the preview endpoint to try to capture any "search" failures (which also include script failures in scripted metric aggregations).
  5. Use the output from the preview endpoint to then index documents through the ingest pipelines.
  6. If no errors are produced on the documents returned from the preview endpoint, start the transform and repeat from step 4 on transform failure.

This change will save hours of debugging / error reproduction and provide a much better user experience, especially for implementation of complex index transforms.

JeffBolle avatar Feb 15 '22 03:02 JeffBolle

Could I be assigned this issue please? Thanks!

AryaMedapati avatar Oct 03 '23 22:10 AryaMedapati