[
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. We also do
not have checks for 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.
Let's add 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.
To check that we parsed bytes correct, let's 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:
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.
> 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. We also do
> not have checks for 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.
> Let's add 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.
> To check that we parsed bytes correct, let's 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)