Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20336

RequestReplyFunction should not silently ignore UNRECOGNIZED state value mutations types

    XMLWordPrintableJSON

Details

    Description

      If a function's response has a PersistedValueMutation type that is UNRECOGNIZED, we currently just silently ignore that mutation:
      https://github.com/apache/flink-statefun/blob/master/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/reqreply/PersistedRemoteFunctionValues.java#L84

      This is incorrect. The UNRECOGNIZED enum constant is a pre-defined constant used by the Protobuf Java SDK, to represent a constant that was unable to be deserialized (because the the serialized constant does not match any enums defined in the protobuf message).

      Therefore, it should be handled by throwing an exception, preferably indicating that there is some sort of version mismatch between the function's Protobuf message definitions, and StateFun's Protobuf message definitions (i.e. most likely a mismatch in the invocation protocol versions).

      Attachments

        Issue Links

          Activity

            People

              tzulitai Tzu-Li (Gordon) Tai
              tzulitai Tzu-Li (Gordon) Tai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: