anton-vinogradov commented on PR #13408: URL: https://github.com/apache/ignite/pull/13408#issuecomment-5131606446
Not done, and I believe it shouldn't be — but I checked rather than assumed, so here is the evidence. `@UseBinaryMarshaller` is not free-standing: `CoreMessagesProvider` asserts it against the registration call — `withSchema` requires it (`"Add @UseBinaryMarshaller for class: ..."`) and `withNoSchema` requires its absence (`"Remove @UseBinaryMarshaller for class: ..."`). `KeyedVersionedValue` is registered `withNoSchema` right next to its parent `CacheVersionedValue` (`CoreMessagesProvider:375-376`), and the parent carries no annotation either. I tried adding it: it compiles, but every node start then trips `java.lang.AssertionError: Remove @UseBinaryMarshaller for class: KeyedVersionedValue` — `GridCacheNearReadersSelfTest` fails on all 7 methods. Reverted; the suite is green again. The reason it isn't needed is that no `Marshaller` ever reaches this class. It has no `@Marshalled` field and does not implement `MarshallableMessage`, so the generated `KeyedVersionedValueMarshaller` has no `Marshaller` field and no constructor taking one — it only does `msg.val.marshal(ctx)` and `msg.key.marshal(ctx)`, i.e. the cache-object path driven by `CacheObjectContext`. The user data inside the key and the value is handled there, not by a `Marshaller`. If the intent is that this message should move to `withSchema` + the annotation on substance (it does carry user data, just through `CacheObject`), that would apply equally to `CacheVersionedValue` and to the other cache-object-only messages, and it would be a change of which marshaller the whole family gets — worth its own ticket rather than a one-line addition here. Happy to file it if you see it that way. -- 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]
