infinispan / infinispan/protostream
Unable to remove @ProtoAdapter and all subClassNames marshallers from SerializationContext
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 56
- Forks
- 39
- Avg merge
- 5h 36m
- Merged PRs (30d)
- 5
Description
It is not possible to cleanly remove all of the marshallers from the SerializationContext when using a `@ProtoAdapter`. I tried doing:
```
var marshaller = ctx.getMarshallerDelegate(ProtoStreamTypeIds.ADAPTER_LIST).getMarshaller();
ctx.unregisterMarshaller(marshaller);
```
However this does not remove all of the `subClassNames` marshaller instances from the `marshallersByClass`. We need a solution that allows us to remove a `@ProtoAdapter` marshaller and all state/marshallers associated with it and its configured `subClassNames`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing SerializationContext.getMarshallerDelegate and unregisterMarshaller, then inspect how marshallersByClass stores the main @ProtoAdapter marshaller and its configured subClassNames instances. Done means removing the adapter also removes all associated state and marshallers, with no remaining subclass entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100