Anton Vinogradov created IGNITE-28941:
-----------------------------------------

             Summary: Test that discovery messages never require cluster-wide 
class registration
                 Key: IGNITE-28941
                 URL: https://issues.apache.org/jira/browse/IGNITE-28941
             Project: Ignite
          Issue Type: Sub-task
          Components: messaging
            Reporter: Anton Vinogradov
            Assignee: Anton Vinogradov
             Fix For: 2.19


h3. Goal

Turn the unwritten rule "the schema-aware marshaller is not allowed on the 
discovery path" into a check that fails in CI.

h3. Why

The rule is kept by convention only, and in at least one place it holds by 
luck: {{BinaryMetadataVersionInfo}} is marshalled with binary inside the jdk 
discovery data bag {{CacheBinaryDataBagItem}}, and works only because 
{{BinaryMetadata}}, {{BinarySchema}} and {{BinaryFieldMetadata}} are listed in 
{{META-INF/classnames.properties}} (2276 pre-accepted names), so 
{{registerClassName}} returns without a ring round-trip. A new type outside 
that file would block the discovery thread on {{fut.get()}}.

h3. How

* walk the message tree reachable from discovery messages - message factory 
plus {{@Order}} fields - and assert that no field on that path is marshalled 
with the schema-aware marshaller;
* optionally add an assertion in {{MarshallerContextImpl#registerClassName}} 
that it is never called from the discovery worker thread.

h3. Expected result

A rule that is checked instead of remembered, so the deadlock cannot be 
reintroduced by a future message.

h3. How to verify

The test must fail on a deliberately mis-marked message and pass on master once 
the other subtasks are in.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to