Skip to content

Refactor IngestDocument reroute recursion detection#95350

Merged
joegallo merged 4 commits intoelastic:mainfrom
joegallo:ingest-document-reroute-recursion
Apr 20, 2023
Merged

Refactor IngestDocument reroute recursion detection#95350
joegallo merged 4 commits intoelastic:mainfrom
joegallo:ingest-document-reroute-recursion

Conversation

@joegallo
Copy link
Copy Markdown
Contributor

Follow up to #94000

Rather than tracking the indexRecursionDetection in the recursive calls to executePipelines(...), I've moved it into the IngestDocument itself as indexHistory.

Note: FinalPipelineIT (untouched by this PR) covers the case of us rejecting a document where the pipelines attempt to create an index cycle.

Among other things, I think it would make it easier in the future to track the values of the _index as they change via pipeline execution (useful for the simulate API, I imagine), but this PR doesn't make any changes along those lines.

@joegallo joegallo added :Distributed/Ingest Node Execution or management of Ingest Pipelines >refactoring Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v8.8.0 labels Apr 18, 2023
@joegallo joegallo requested a review from dakrone April 18, 2023 21:46
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Copy link
Copy Markdown
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Joe

@joegallo joegallo merged commit 89770c5 into elastic:main Apr 20, 2023
@joegallo joegallo deleted the ingest-document-reroute-recursion branch April 20, 2023 15:01
@felixbarny
Copy link
Copy Markdown
Member

Is there a way to access the index history from a processor so that users can use, for example, a set processor to introspect the index history of a document?

Something like

- set:
  field: reroute_history
  copy_from: _ingest.index_history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Ingest Node Execution or management of Ingest Pipelines >refactoring Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v8.8.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants