Skip to content

IGNITE-28937 Register core messages uniformly: drop withSchema/withNoSchema - #13421

Open
anton-vinogradov wants to merge 4 commits into
apache:masterfrom
anton-vinogradov:ignite-28937
Open

IGNITE-28937 Register core messages uniformly: drop withSchema/withNoSchema#13421
anton-vinogradov wants to merge 4 commits into
apache:masterfrom
anton-vinogradov:ignite-28937

Conversation

@anton-vinogradov

Copy link
Copy Markdown
Contributor

Problem

After IGNITE-28929 the marshaller of a message is stated by @UseBinaryMarshaller, and CoreMessagesProvider#withSchema / #withNoSchema became the same code. They differ only by an assert that the annotation matches the chosen helper, so the same fact is stored twice and the assert only checks that the two copies agree. CalciteMessageFactory already uses the plain form register(factory, cls, id).

Separately, register threaded a Marshaller into the serializer and deployer lookups. Neither takes one: 0 of 197 generated serializers and 0 of 31 generated deployers declare a constructor with Marshaller, and the generators cannot emit one.

Solution

  • 299 withSchema/withNoSchema calls replaced with register(factory, cls, msgIdx++), both helpers deleted;
  • the marshaller now reaches only the generated marshaller companion — loadGenerated(cls, suffix) for the serializer and the deployer takes no marshaller and asserts the companion has a no-arg constructor, so a future change in the generator surfaces immediately.

Behaviour is unchanged. Note that until IGNITE-28940 removes the annotation altogether, a misplaced @UseBinaryMarshaller is silently ignored instead of tripping an assert.

Part of IGNITE-28935.

Verification

  • message id map compared before and after by parsing both versions of the provider: 299 registrations, 0 differences in id -> class
  • MessageProcessorTest — 39/39
  • MessageFactoryMarshallerInitializationTest — 3/3
  • DirectMarshallingMessagesTest — 1/1
  • GridCacheAtomicNearEnabledFullApiSelfTest — 150/150
  • full build with -Pcheckstyle — clean

Generated code is unchanged by construction: no message class is touched, only the provider and the factory base.

🤖 Generated with Claude Code

…Schema

After IGNITE-28929 the marshaller of a message is set by @UseBinaryMarshaller, and the
two registration helpers became the same code: they differed only by an assert that the
annotation matches the helper. The same fact was stored twice, and the assert only checked
that the two copies agree.

Replaced the 299 withSchema/withNoSchema calls with register(factory, cls, msgIdx++) and
deleted both helpers, so registration in core now reads like CalciteMessageFactory.

Also stopped passing a Marshaller into the serializer and deployer lookups: neither takes
one - 0 of 197 generated serializers and 0 of 31 generated deployers declare such a
constructor, and the generators cannot emit one. The marshaller now reaches only the
generated marshaller companion.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@anton-vinogradov

anton-vinogradov commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

/runall


🚀 RunAll queuedbuild 9243588 · live progress & verdict: Ignite PR Checker. The verdict lands here when the run finishes.
🏁 Run finished — analysing; the verdict comment follows.

Comment thread modules/core/src/main/java/org/apache/ignite/internal/CoreMessagesProvider.java Outdated
…use helpers

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@anton-vinogradov

anton-vinogradov commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

/runall


🚀 RunAll queuedbuild 9243985 · live progress & verdict: Ignite PR Checker. The verdict lands here when the run finishes.
~1h 48m remaining — ≈ 21:55 MSK (updates every minute).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@anton-vinogradov

anton-vinogradov commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

/runall


🚀 RunAll queuedbuild 9244139 · live progress & verdict: Ignite PR Checker. The verdict lands here when the run finishes.
~2h 45m remaining — ≈ 23:03 MSK (updates every minute). Reply /top to jump the queue.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@anton-vinogradov

anton-vinogradov commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

/runall


🚀 RunAll queuedbuild 9244287 · live progress & verdict: Ignite PR Checker. The verdict lands here when the run finishes.
🛑 Run cancelled.

@anton-vinogradov

anton-vinogradov commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

/runall


🚀 RunAll queuedbuild 9244731 · live progress & verdict: Ignite PR Checker. Your previous run was cancelled — this one supersedes it. The verdict lands here when the run finishes.

@anton-vinogradov

Copy link
Copy Markdown
Contributor Author

Ignite PR Checker verdict · RunAll 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants