zxs1633079383 commented on issue #872:
URL: https://github.com/apache/flink-agents/issues/872#issuecomment-4889908271
Thanks for the direction here. I agree with the split: `Event` should stay
JSON-based because it is part of the cross-language/event-log contract, while
`MemoryUpdate.value` is replay/state payload and needs type fidelity more than
readability.
My preferred shape would be:
1. Do not use Jackson default typing for arbitrary `Object` values. It would
fix some type loss, but opens a much larger polymorphic-deserialization surface
than this field needs.
2. Encode `MemoryUpdate.value` through a dedicated binary envelope in the
`ActionState` JSON, e.g. `{ "serde": "...", "version": 1, "payload": "<base64>"
}`, so the outer `ActionState` remains inspectable while the replay payload
preserves Java/Flink types.
3. If "Flink native State Serializer" for an untyped `Object` effectively
becomes Kryo/GenericTypeInfo, we should make that explicit and document the
recovery compatibility contract: serializer version, Flink/Kryo upgrade
expectations, and what is or is not guaranteed across releases.
4. Add focused tests for top-level `byte[]`, nested `byte[]`, top-level
`Long`, nested `Long`, and ideally one simple custom value object if that is
intended to be supported.
For sequencing, I think `#871` can still be merged as a tactical fix if
maintainers want the common top-level `byte[]` case fixed quickly. Then `#872`
can be the broader binary-serde change and either supersede or retire the
narrow `__flink_agents_bytes__` envelope.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]