[
https://issues.apache.org/jira/browse/IGNITE-29374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleksandr Chesnokov updated IGNITE-29374:
-----------------------------------------
Description:
Ignite does not have compatibility tests that check message serialization and
deserialization between different versions during Rolling Upgrade. This also
includes wire format changes controlled by introducedBy and deprecatedBy.
IGNITE-29337 proposes writing all messages with one Ignite version to a file
and reading the file with another version. The check must work in both
directions.
This approach requires direct use of low-level serialization code. It may be
difficult to support across several Ignite versions because the internal
implementation can be refactored without changing the wire protocol.
This task adds compatibility tests at the highest practical level. The tests
must use production communication and discovery paths and avoid direct calls to
MessageWriter and MessageReader.
h3. Communication test
Start an old-version node and a current-version node in the same cluster.
Test both directions separately:
* Send every message registered by the old node to the current node.
* Send current-version messages to the old node for every direct type
registered by the old version.
The messages must pass through the production communication transport. After
deserialization, verify that every direct type was mapped to the expected
message class.
h3. TCP discovery tests
Add mixed-version smoke tests for the production TCP discovery protocol:
* A current server joins an old server.
* An old server joins a current server.
* A current client joins an old server.
* An old client joins a current server.
* The nodes see each other in the topology.
* Discovery ping works.
* Remote metrics are updated.
* Cache creation and removal are processed by both server nodes.
h3. Implementation details
The communication test intentionally uses message instances with default field
values.
Setting meaningful values for every field of every registered message would
require message-specific setup and a large amount of maintenance. A generic
comparison of these values would also not prove that the receiving node
interprets the message correctly. Message semantics must be checked by
production functional tests.
Put one stable marker message after every tested message. The marker must
contain a known value and the index of the tested message. If a reader consumes
an incorrect number of bytes, reads fields in a wrong order, or changes the
message boundary, the next marker must fail validation.
The test may intercept messages after wire deserialization and before their
production handlers. This prevents empty test messages from causing normal
application side effects.
h3. Acceptance criteria
* Communication is checked in both directions.
* All messages registered by the old node are covered.
* Communication messages use the production TCP transport.
* Discovery messages use the production TCP discovery protocol.
* A node join, deserialization, class mapping, or marker validation failure
fails the test.
* The tests run against supported released versions starting from 2.18.0.
* The tests do not require Docker, external services, or new test libraries.
h3. Limitations
* The test checks wire structure and message boundaries. It does not check the
semantic meaning of every message field.
* Only messages registered in the configured nodes are covered. Messages from
optional modules that are not enabled in the test configuration are out of
scope.
was:
This task adds high-level mixed-version smoke tests for the production
communication and TCP discovery paths. It complements IGNITE-29337 and does not
replace its offline field-level serialization checks.
h3. Communication scenario
# Start an old-version server and a current-version server in the same cluster.
# Collect messages registered in the old node MessageFactory. Exclude only
explicitly documented types that cannot affect Rolling Upgrade.
# Send default message instances from old to current through the production
communication transport.
# Send current messages to old for direct types registered by the old version.
# Put a checksum message after each tested message.
# Verify the class mapped to every direct type and verify every checksum after
deserialization.
# Propagate a remote validation error to the test process without waiting for a
timeout.
h3. TCP discovery scenarios
# Start current server with old server and in the reverse order.
# Start current client with old server and in the reverse order.
# Verify topology, discovery ping, and remote metrics updates.
# Create and destroy a cache to exercise TcpDiscoveryCustomEventMessage.
h3. Requirements
* Use the compatibility module and the standard Ignite test framework.
* Do not require Docker, external services, or new test libraries.
* Keep old-to-current and current-to-old communication tests independent.
* Exercise the production communication and discovery paths, including the
mixed-version handshake.
* Run against released versions starting from 2.18.0. A node join failure is a
compatibility failure and must not be bypassed.
h3. Out of scope
* Offline MessageWriter/MessageReader checks based on saved byte arrays.
* JSON descriptions and field-value validation for @Since/@Until. These remain
in IGNITE-29337.
* Messages of optional modules that are not registered in the configured node.
Summary: RU: Test communication and discovery messages through
production paths (was: RU: online compatibility smoke tests for communication
and TCP discovery)
> RU: Test communication and discovery messages through production paths
> ----------------------------------------------------------------------
>
> Key: IGNITE-29374
> URL: https://issues.apache.org/jira/browse/IGNITE-29374
> Project: Ignite
> Issue Type: Sub-task
> Reporter: Aleksandr Chesnokov
> Assignee: Aleksandr Chesnokov
> Priority: Major
>
> Ignite does not have compatibility tests that check message serialization and
> deserialization between different versions during Rolling Upgrade. This also
> includes wire format changes controlled by introducedBy and deprecatedBy.
> IGNITE-29337 proposes writing all messages with one Ignite version to a file
> and reading the file with another version. The check must work in both
> directions.
> This approach requires direct use of low-level serialization code. It may be
> difficult to support across several Ignite versions because the internal
> implementation can be refactored without changing the wire protocol.
> This task adds compatibility tests at the highest practical level. The tests
> must use production communication and discovery paths and avoid direct calls
> to MessageWriter and MessageReader.
> h3. Communication test
> Start an old-version node and a current-version node in the same cluster.
> Test both directions separately:
> * Send every message registered by the old node to the current node.
> * Send current-version messages to the old node for every direct type
> registered by the old version.
> The messages must pass through the production communication transport. After
> deserialization, verify that every direct type was mapped to the expected
> message class.
> h3. TCP discovery tests
> Add mixed-version smoke tests for the production TCP discovery protocol:
> * A current server joins an old server.
> * An old server joins a current server.
> * A current client joins an old server.
> * An old client joins a current server.
> * The nodes see each other in the topology.
> * Discovery ping works.
> * Remote metrics are updated.
> * Cache creation and removal are processed by both server nodes.
> h3. Implementation details
> The communication test intentionally uses message instances with default
> field values.
> Setting meaningful values for every field of every registered message would
> require message-specific setup and a large amount of maintenance. A generic
> comparison of these values would also not prove that the receiving node
> interprets the message correctly. Message semantics must be checked by
> production functional tests.
> Put one stable marker message after every tested message. The marker must
> contain a known value and the index of the tested message. If a reader
> consumes an incorrect number of bytes, reads fields in a wrong order, or
> changes the message boundary, the next marker must fail validation.
> The test may intercept messages after wire deserialization and before their
> production handlers. This prevents empty test messages from causing normal
> application side effects.
> h3. Acceptance criteria
> * Communication is checked in both directions.
> * All messages registered by the old node are covered.
> * Communication messages use the production TCP transport.
> * Discovery messages use the production TCP discovery protocol.
> * A node join, deserialization, class mapping, or marker validation failure
> fails the test.
> * The tests run against supported released versions starting from 2.18.0.
> * The tests do not require Docker, external services, or new test libraries.
> h3. Limitations
> * The test checks wire structure and message boundaries. It does not check
> the semantic meaning of every message field.
> * Only messages registered in the configured nodes are covered. Messages from
> optional modules that are not enabled in the test configuration are out of
> scope.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)