Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix delete and recreate pipeline with same pipeline ID and config string #12389

Merged
merged 5 commits into from
Nov 9, 2020

Conversation

kaisecheng
Copy link
Contributor

To fix the issue described in #12387 , this PR modifies the hash function of the pipeline to include metadata and config string.

Users should be able to recreate the pipeline given that the metadata value has changed.

A follow-up Kibana task should update the version number for every change

@elasticsearch-bot elasticsearch-bot self-assigned this Oct 28, 2020
if (this.metadata == null) {
synchronized(this) {
if (this.metadata == null) {
StringBuilder sb = confParts.stream().reduce(new StringBuilder(), (builder, item) -> builder.append(item.getMetadata()), StringBuilder::append);
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably we could simplify with:

confParts.stream().map(SourceWithMetadata::getMetadata).collect( Collectors.joining(""));

@andsel andsel self-requested a review November 9, 2020 11:42
Copy link
Contributor

@andsel andsel left a comment

Choose a reason for hiding this comment

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

LGTM

@kaisecheng kaisecheng merged commit 606cfe5 into elastic:master Nov 9, 2020
kaisecheng added a commit to kaisecheng/logstash that referenced this pull request Nov 9, 2020
kaisecheng added a commit to kaisecheng/logstash that referenced this pull request Nov 9, 2020
kaisecheng added a commit to kaisecheng/logstash that referenced this pull request Nov 11, 2020
elasticsearch-bot pushed a commit that referenced this pull request Nov 11, 2020
kares added a commit that referenced this pull request Dec 1, 2020
andsel pushed a commit that referenced this pull request Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants