[
https://issues.redhat.com/browse/ISPN-11910?page=com.atlassian.jira.plugi...
]
Gustavo Fernandes edited comment on ISPN-11910 at 6/1/20 10:41 AM:
-------------------------------------------------------------------
The concept of 'user marshaller' should be phased out and replaced by pluggable
transcoders. Since each cache can use different storage and request formats, does it still
make sense to elect a 'user marshaller'?
Regarding seeing MediaType A as B, and assuming formats for certain situations, all of
this ambiguity could be removed by making the media type config mandatory. Or at least
mandating media type in certain situations that is necessary to know the format: Query,
Listeners, Filters/Converter, Iteration, Scripts
was (Author: gustavonalle):
The concept of 'user marshaller' should be phased out and replaced by pluggable
transcoders. Since each cache can use different storage and request formats, does it still
make sense to elect a 'user marshaller'?
Regarding seeing MediaType A as B, and assuming formats for certain situations, all of
this ambiguity could be removed by making the media type config mandatory. Or at least
mandating media type in certain situations that is necessary to know the format: Query,
Listeners, Filters/Converter, Iteration.
Server should see application/octet-stream as protostream
---------------------------------------------------------
Key: ISPN-11910
URL:
https://issues.redhat.com/browse/ISPN-11910
Project: Infinispan
Issue Type: Enhancement
Components: Server
Affects Versions: 11.0.0.CR1
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Major
Fix For: 11.0.0.Final
The server, and Infinispan in general, should use the user marshaller to read
{{application/octet-stream}} and {{application/unknown}} data.
ISPN-10433 added a hack in the server (for backwards compatibility, I assume): if
{{jboss-marshalling}} is on the classpath,
{{org.infinispan.server.core.LifecycleCallbacks.cacheManagerStarting()}} changes the
marshaller for {{application/unknown}} (but not for {{application/octet-stream}}) to
{{GenericJBossMarshaller}}.
This means that {{server/core}}, {{server/hotrod}}, and {{client/hotrod-client}} tests
see {{application/unknown}} as protostream, but the server distribution in
{{server/runtime}} always includes {{jboss-marshalling}}, so the server distribution sees
{{application/unknown}} as {{GenericJBossMarshaller}} data.
It would be much better if the server always used the user marshaller for
{{application/unknown}}, and when a user needs backwards compatibility between a new
server and an old client, they should configure {{GenericJBossMarshaller}} in the server.
In addition, new clients should not use {{application/unknown}} unless the marshaller
does not implement {{getMediaType()}}: they know the marshaller's media type, and they
should send it to the server.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)