Skip to content

Commit

Permalink
fix(stdlib): ignore unknown messages rather than erroring (#5009)
Browse files Browse the repository at this point in the history
The process message method is intended to ignore messages it does not
understand rather than actively return an error. This removes the error
from join for an invalid message.
  • Loading branch information
jsternberg authored Jul 20, 2022
1 parent c5cd000 commit d061ee4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions execute/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ import (
// Transport is an interface for handling raw messages.
type Transport interface {
// ProcessMessage will process a message in the Transport.
//
// Messages sent to the Transport may be one of many types.
// Known message should be handled as is appropriate, but
// unknown messages should be acked but otherwise ignored.
// An error should not be returned for unknown messages.
ProcessMessage(m Message) error
}

Expand Down
2 changes: 0 additions & 2 deletions stdlib/join/merge_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ func (t *MergeJoinTransformation) ProcessMessage(m execute.Message) error {
})
t.d.Finish(err)
}
default:
return errors.New(codes.Internal, "invalid message")
}
return nil
}
Expand Down

0 comments on commit d061ee4

Please sign in to comment.