[
https://issues.apache.org/jira/browse/IGNITE-28939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Anton Vinogradov updated IGNITE-28939:
--------------------------------------
Description:
*Wire format change. Do this before 2.19 is released - after that it would
break rolling upgrade.*
h3. Goal
Remove the question "which marshaller" for fields that hold internal classes.
h3. Why
Some fields are sent as blobs only because an internal class was never made a
{{Message}}. Binary gives no schema for them anyway:
{{BinaryUtils#isCustomJavaSerialization}} checks the whole class hierarchy, so
{{Externalizable}} classes fall back to {{OptimizedMarshaller}} inside binary.
One of these fields is also a mismatch: {{BinaryMetadata}} uses binary in
{{BinaryMetadataVersionInfo}} and jdk in {{MetadataUpdateProposedMessage}}.
h3. How
Convert to normal message fields:
* {{BinaryMetadataVersionInfo#metadata}} and
{{MetadataUpdateProposedMessage#metadata}} - {{BinaryMetadata}} has simple
fields: type id, type name, field map, schemas, flags;
* {{ChangeGlobalStateMessage#baselineTopology}} - {{BaselineTopology}};
* {{GridJobSiblingsResponse#siblings}} - the implementation is the internal
{{GridJobSiblingImpl}};
* {{StoredCacheData#qryEntities}} and {{DynamicCacheChangeRequest#schema}} -
{{QueryEntityMessage}} already exists.
Fields that really hold user classes stay blobs: node attributes, service
affinity key, query entity default values, entry processors, invoke arguments,
query filters, task results, message topic, cache configuration, plugin data
and {{Throwable}}.
h3. Expected result
Blob fields: 24 now, about 19 after. The {{BinaryMetadata}} mismatch is gone.
These fields no longer depend on a marshaller, and usually become smaller on
the wire.
h3. How to verify
Binary metadata tests, node join tests, cluster state change tests, dynamic
cache start with query entities, job siblings tests. Compare message size
before and after.
was:
h3. Goal
Remove the question "which marshaller" for fields holding internal types,
instead of answering it.
h3. Why
Some blob fields exist only because an internal type was never turned into a
{{Message}}. For them binary brings no schema at all:
{{BinaryUtils#isCustomJavaSerialization}} walks the whole class hierarchy, so
{{Externalizable}} types fall back to {{OptimizedMarshaller}} inside binary.
One of them is also the source of an inconsistency - {{BinaryMetadata}} travels
binary in {{BinaryMetadataVersionInfo}} and jdk in
{{MetadataUpdateProposedMessage}}.
h3. How
Convert to plain message serialization:
* {{BinaryMetadataVersionInfo#metadata}} and
{{MetadataUpdateProposedMessage#metadata}} - {{BinaryMetadata}} has flat
fields: type id and name, field metadata map, schemas, enum maps, flags;
* {{ChangeGlobalStateMessage#baselineTopology}} - {{BaselineTopology}};
* {{GridJobSiblingsResponse#siblings}} - implemented by the internal
{{GridJobSiblingImpl}};
* {{StoredCacheData#qryEntities}} and {{DynamicCacheChangeRequest#schema}} -
{{QueryEntityMessage}} already exists.
Fields that genuinely carry user classes stay blobs: node attributes, service
affinity key, query entity default values, entry processors and invoke
arguments, query filters, reducers and transformers, task results, message
topic, cache configuration, plugin discovery data, {{Throwable}}.
h3. Expected result
Blob fields drop from 24 to about 19, the {{BinaryMetadata}} inconsistency
disappears, and the converted fields stop depending on any marshaller - usually
getting smaller on the wire as a bonus.
h3. How to verify
Binary metadata update and node join tests, cluster state change tests, dynamic
cache start with query entities, job siblings tests; compare wire size for the
converted messages.
Labels: compatibility (was: )
Summary: Turn blob fields of internal types into normal message fields
(was: Replace marshaller blobs of internal types with regular message fields)
> Turn blob fields of internal types into normal message fields
> -------------------------------------------------------------
>
> Key: IGNITE-28939
> URL: https://issues.apache.org/jira/browse/IGNITE-28939
> Project: Ignite
> Issue Type: Sub-task
> Components: messaging
> Reporter: Anton Vinogradov
> Assignee: Anton Vinogradov
> Priority: Major
> Labels: compatibility
> Fix For: 2.19
>
>
> *Wire format change. Do this before 2.19 is released - after that it would
> break rolling upgrade.*
> h3. Goal
> Remove the question "which marshaller" for fields that hold internal classes.
> h3. Why
> Some fields are sent as blobs only because an internal class was never made a
> {{Message}}. Binary gives no schema for them anyway:
> {{BinaryUtils#isCustomJavaSerialization}} checks the whole class hierarchy,
> so {{Externalizable}} classes fall back to {{OptimizedMarshaller}} inside
> binary. One of these fields is also a mismatch: {{BinaryMetadata}} uses
> binary in {{BinaryMetadataVersionInfo}} and jdk in
> {{MetadataUpdateProposedMessage}}.
> h3. How
> Convert to normal message fields:
> * {{BinaryMetadataVersionInfo#metadata}} and
> {{MetadataUpdateProposedMessage#metadata}} - {{BinaryMetadata}} has simple
> fields: type id, type name, field map, schemas, flags;
> * {{ChangeGlobalStateMessage#baselineTopology}} - {{BaselineTopology}};
> * {{GridJobSiblingsResponse#siblings}} - the implementation is the internal
> {{GridJobSiblingImpl}};
> * {{StoredCacheData#qryEntities}} and {{DynamicCacheChangeRequest#schema}} -
> {{QueryEntityMessage}} already exists.
> Fields that really hold user classes stay blobs: node attributes, service
> affinity key, query entity default values, entry processors, invoke
> arguments, query filters, task results, message topic, cache configuration,
> plugin data and {{Throwable}}.
> h3. Expected result
> Blob fields: 24 now, about 19 after. The {{BinaryMetadata}} mismatch is gone.
> These fields no longer depend on a marshaller, and usually become smaller on
> the wire.
> h3. How to verify
> Binary metadata tests, node join tests, cluster state change tests, dynamic
> cache start with query entities, job siblings tests. Compare message size
> before and after.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)