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

[BUG] Non-registered Writeables can't be used in Stream collection methods #358

Closed
dbwiddis opened this issue Jan 4, 2024 · 0 comments · Fixed by #359
Closed

[BUG] Non-registered Writeables can't be used in Stream collection methods #358

dbwiddis opened this issue Jan 4, 2024 · 0 comments · Fixed by #359
Assignees
Labels
bug Something isn't working untriaged

Comments

@dbwiddis
Copy link
Member

dbwiddis commented Jan 4, 2024

What is the bug?

On some multi-node clusters, provisioning a workflow fails with an error log including this message:

[2024-01-04T02:11:48,542][WARN ][o.o.t.OutboundHandler    ] [opensearch-cluster-master-2] send message failed [channel: Netty4TcpChannel{localAddress=/192.168.8.228:54358, remoteAddress=192.168.38.120/192.168.38.120:9300}]
java.lang.IllegalArgumentException: can not write type [class org.opensearch.flowframework.model.ResourceCreated]
[2024-01-04T02:11:48,544][ERROR][o.o.f.w.AbstractRetryableWorkflowStep] [opensearch-cluster-master-2] Failed to update new created resource

How can one reproduce the bug?

Run latest main branch code on a multi-node cluster and provision something that updates the resource state.

What is the expected behavior?

Resources are provisioned.

Do you have any additional context?

The bug is in this line:

This line is also a bug, but the failure to write means it never got here to read:

this.resourcesCreated = input.readList(ResourceCreated::new);

The collection-writing methods in StreamInput and StreamOutput rely on readGenericValue() and writeGenericValue() methods, but these only work on well-known types which have been registered in the WriteableRegistry.

These lists need to be iterated individually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant