You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Anton Vinogradov (Jira)" <ji...@apache.org> on 2026/07/31 19:48:00 UTC
[jira] [Commented] (IGNITE-28937) Register core messages uniformly: drop withSchema/withNoSchema
[ https://issues.apache.org/jira/browse/IGNITE-28937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100895#comment-18100895 ]
Anton Vinogradov commented on IGNITE-28937:
-------------------------------------------
[Ignite PR Checker|https://ignite-pr-checker.is-a.dev/?pr=13421] verdict for PR 13421 · RunAll build [9244731|https://ci2.ignite.apache.org/build/9244731] · 147 suites ran, 0 reused
(/) *No blockers* — nothing in this run looks caused by this PR. 61 pre-existing/flaky tests filtered out.
> Register core messages uniformly: drop withSchema/withNoSchema
> --------------------------------------------------------------
>
> Key: IGNITE-28937
> URL: https://issues.apache.org/jira/browse/IGNITE-28937
> Project: Ignite
> Issue Type: Sub-task
> Components: messaging
> Reporter: Anton Vinogradov
> Assignee: Anton Vinogradov
> Priority: Major
> Labels: IEP-132
> Fix For: 2.19
>
> Time Spent: 2h
> Remaining Estimate: 0h
>
> *No wire format change.*
> h3. Goal
> Use one way to register a message, and keep the marshaller written in one place.
> h3. Why
> After IGNITE-28929 the marshaller is set by {{@UseBinaryMarshaller}}. Since then {{CoreMessagesProvider#withSchema}} and {{#withNoSchema}} do the same thing. They differ only by an assert that the annotation matches the method. So the same fact is stored twice, and the assert only checks that the two copies agree. {{CalciteMessageFactory}} already uses the simple form {{register(factory, cls, id)}}.
> Also, {{register}} passes a {{Marshaller}} to the serializer and deployer lookups, but they never take one: 0 of 462 generated serializers and 0 of 31 generated deployers have such a constructor.
> h3. How
> * replace the 297 {{withSchema}} and {{withNoSchema}} calls with {{register(factory, cls, msgIdx++)}}, and delete both methods;
> * pass the marshaller only where the {{Marshaller}} companion is created.
> h3. Expected result
> Registration in core looks like calcite. Behaviour does not change: generated companions stay the same.
> Note: after this change a wrong annotation is ignored instead of failing an assert. This ends when IGNITE-28940 removes the annotation.
> h3. How to verify
> Compare generated companions before and after: they must be equal. Run {{MessageFactoryMarshallerInitializationTest}}, {{MessageProcessorTest}} and {{DirectMarshallingMessagesTest}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)